Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some columns A, B, C, D, E, F, G with some values in the rows below 2, 3, 4. I don't know if HLOOKUP is the correct answer for what I am trying to do but I want to have a function that looks at the values in row 4, finds the highest/greatest value, and then return the column name/label.

I am really rusty with Excel (this is 2011 by the way) so excuse me if it is a noob question. Don't waste your time telling me how easy it was to do. Just show me the solution.

share|improve this question
    
This thread may help: superuser.com/questions/316239/… –  F106dart Dec 7 '12 at 20:56
add comment

1 Answer

up vote 2 down vote accepted

Here's a way:

=INDIRECT("R1C" & MATCH(MAX(4:4),4:4,0),FALSE)

Here's another:

=INDEX(1:1,0,MATCH(MAX(4:4),4:4,0))

By the way, I was assuming by column name/label that you meant the header row value...

share|improve this answer
    
Hey it works. Thanks! –  user1470242 Dec 7 '12 at 20:57
    
I found that it actually needed to be =INDIRECT("R1C" & MATCH(MAX(4:4),4:4,0),FALSE) –  user1470242 Dec 7 '12 at 22:09
1  
I prefer the INDEX method....but that also requires 0 as 3rd argument of MATCH, i.e. =INDEX(1:1,MATCH(MAX(4:4),4:4,0)) –  barry houdini Dec 8 '12 at 0:04
    
@all Thanks for reminding me that there's a 3rd parameter in Match. When I tested it, it seemed to work with just 2 so it simply slipped my mind. I added the 0s to assist future viewers. –  Daniel Cook Dec 8 '12 at 0:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.