View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default How to lookup a value in excel?

Eric

actually, Gary's Student gave you the correct answer.

My answer was returning the row number, not the value ... it just so
happened that the data in the cell (in the example) matched the row number.

CSE with my formula does always work but always returns the row not the
value.

So, apologies ... not sure why the error is generated but an interesting
debate. Confusing !

Regards

Trevor


"Eric" wrote in message
...
Thank everyone very much
Eric

"JMay" wrote:

Here's another way (close to TS's - FYI):

=OFFSET(A1,MATCH(MAX(B:B),B:B,0)-1,0)


"Trevor Shuttleworth" wrote in message
:

Eric

one way:

=INDEX(MATCH(MAX(B:B),B:B,0),A:A)

Regards

Trevor


"Eric" wrote in message
...
Does anyone know how to lookup a value in following example?

[A1] 1 [B1] 45
[A2] 2 [B2] 90
[A3] 3 [B3] 88
[A4] 4 [B4] 56

I would like to look up the highest value under B colume, such as 90
in
cell
B2 in this case, and return the value of 2 from cell A2 into C1 cell.
Does anyone have any suggestion?
Thank you very much
Eric