View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Lookup Value in Table

=LOOKUP(MAX(A2:C2),A2:C2,A1:C1)

The lookup_vector must be sorted in ascending order. You're getting the
correct result with this based on the OP's sample data by shear luck. Try
making A2 the max value then see what happens.

Try this:

=INDEX(A1:C1,MATCH(MAX(A2:C2),A2:C2,0))

If there is more than one instance of MAX the formula will match the
leftmost instance.


--
Biff
Microsoft Excel MVP


"Sheeloo" <="to" & CHAR(95) & "sheeloo" & CHAR(64) & "hotmail.com" wrote in
message ...
Try
=LOOKUP(MAX(A2:C2),A2:C2,A1:C1)

"Thomas Mandeville" wrote:

Excel 2007

I have data that looks like the following

A B C
Row 1 INTC MSFT IBM
Row 2 $1500 $2400 $1850

I need to write a formula that finds the maximum value in row 2, and
returns the corresponding value in row 1. The MAX() function will
return $2400, but I can't figure out how to get my formula to return
"MSFT" which is what I really need.

Any help will be greatly appreciated!

--Tom