View Single Post
  #3   Report Post  
Domenic
 
Posts: n/a
Default


Assuming that Column A and Column B contain your data, the following
will return the 'value name' corresponding with the highest value,
including the 'value name' of any ties for the highest value...

C2, copied down:

=RANK(B2,$B$2:$B$10)+COUNTIF($B$2:B2,B2)-1

D1: enter 1, indicating that you want a 'Top 1' list

E1:

=MAX(IF(B2:B10=INDEX(B2:B10,MATCH(D1,C2:C10,0)),C2 :C10))-D1

...confirmed with CONTROL+SHIFT+ENTER

F2, copied down:

=IF(ROW()-ROW(F$2)+1<=$D$1+$E$1,INDEX(A$2:A$10,MATCH(ROW()-ROW(F$2)+1,$C$2:$C$10,0)),"")

If you also want to return the corresponding 'Value', copy this formula
over to the next column, Column G.

Also, if for example you want a 'Top 5' list, change the 1 in D1 to a 5
and you will automatically get a Top 5 list, again, including any ties
for 5th place.

Hope this helps!

Fishbone Wrote:
I have a list with value_name and its value. Is there a formula that
can look down the list and pick the highest value and return the
value_name

For example

_Value_Name_ _Value_
Value A 5
Value B 10
Value C 33
Value D 8
Value E 51
Value F 32
Value G 47
Value H 9
Value I 41

So the formula would return Value E as its result.

Would be much appreciated :)



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=395276