how do i get field name from result of MAX or LARGE function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'
 
Try this:

=INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'
 
Thanks so much, it worked great. The ,0)) at the end makes all the
differance, but why?
 
The 0 at the end makes the Match() function look for exact matches *only*.
When looking for exact matches, the lookup data table does *not* have to be
sorted, and since yours (Column B) is not sorted, it returned the correct
value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top