Taher Alaa
Taher Alaa

Reputation: 21

Excel - Getting corresponding value to another cell

I would like to get a formula in Excel to search for the value in the green box using two inputs,

  1. the temperature in the first column [in this example 19]
  2. the corresponding value [in this example 872.7]

Thanks in advance.

Capture1

Upvotes: 0

Views: 242

Answers (1)

Solar Mike
Solar Mike

Reputation: 8375

So index() with match() twice, once for row and once for column:

=index(A2:I24,match(19.5,A2:A24,0),match(870,A2:I2,0))

All ranges based on cell A2 is “Temp C”

But I would put 19.5 and 870 in cells to make the formula more useful.

Also, the 3rd argument (0) in match can be 1 or -1 to get the closest result either larger or smaller.

Upvotes: 2

Related Questions