Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to lookup a value in excel?

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How to lookup a value in excel?

Either use VLOOKUP() or

=INDEX(A:A,MATCH(MAX(B:B),B:B,0),0)
--
Gary's Student


"Eric" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default How to lookup a value in excel?

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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to lookup a value in excel?

Thank everyone for suggestion

=INDEX(MATCH(MAX(B:B),B:B,0),A:A)
If I input this formula in cell C1, then it works fine, but if I input this
formula in cell C2, then it returns #REF!, could you please tell me how to
fix this value?
Thank everyone very much
Eric

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default How to lookup a value in excel?

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




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to lookup a value in excel?

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



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default How to lookup a value in excel?

I see what you mean and I too don't understand why the last parameter
(the A:A) gets messed up evaluating to #NUM! - Using my offset function
(modified
Below changing the A1 ref to $A$1) it seems to work wherever it's moved.

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

I'm interested in know why the #NUM! occurs...

Jim May

"Eric" wrote in message
:

Thank everyone for suggestion

=INDEX(MATCH(MAX(B:B),B:B,0),A:A)
If I input this formula in cell C1, then it works fine, but if I input this
formula in cell C2, then it returns #REF!, could you please tell me how to
fix this value?
Thank everyone very much
Eric


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 422
Default How to lookup a value in excel?

OK, found OUT something (I didn't fully understand - and still don't
totally, but) If you commit TS's Original formula with the
Ctrl+Shift+Enter keys VERSUS just eh enter key - It works WHEREEVER it
is entered or later moved Or copied. The "CSE" conerts the normal
formula into what is called
An array-formula - which is what is needed, Hope this helps,,,
Jim

"JMay" wrote in message
:

I see what you mean and I too don't understand why the last parameter
(the A:A) gets messed up evaluating to #NUM! - Using my offset function
(modified
Below changing the A1 ref to $A$1) it seems to work wherever it's moved.

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

I'm interested in know why the #NUM! occurs...

Jim May

"Eric" wrote in message
:

Thank everyone for suggestion

=INDEX(MATCH(MAX(B:B),B:B,0),A:A)
If I input this formula in cell C1, then it works fine, but if I input this
formula in cell C2, then it returns #REF!, could you please tell me how to
fix this value?
Thank everyone very much
Eric


  #9   Report Post  
Posted to microsoft.public.excel.misc
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel file with hyperlinks takes a long time to open over the network Didier P Links and Linking in Excel 3 July 4th 06 04:39 PM
Excel lookup macro Lanman6 Excel Discussion (Misc queries) 1 May 23rd 06 11:23 PM
Multiple Excel versions. Naveen Mukkelli Excel Discussion (Misc queries) 0 May 16th 06 12:55 AM
excel cell lookup file on harddrive dj_siek Excel Discussion (Misc queries) 4 February 8th 06 12:09 AM
Lookup Access data in Excel Chris Kellock Excel Worksheet Functions 1 December 28th 04 01:51 PM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"