Let your values are in A1:B9
, then use:
=INDEX(B1:B9,MATCH(MIN(ABS(IF(A1:A9=12.5,B1:B9)-0.7)),ABS(IF(A1:A9=12.5,B1:B9)-0.7),0))
This is an array formula, so type the formula then press CTRL+SHIFT+ENTER. Curly brackets will automatically appear at the start and end of the formula.
Or another approach (returns min from closest):
=MIN(IF(MIN(ABS(IF(A1:A9=12.5,B1:B9)-0.7))=ABS(IF(A1:A9=12.5,B1:B9)-0.7),B1:B9))
also with array entry (CTRL+SHIFT+ENTER)