Hi,
What I am trying to do is look for the max value in a row and return
the relevant column header
Example:
1-----2-----3-----4------5-----6-----7----
35---29----16----3----21----45----5----
So, the function should look down a row, find the max value of 45 and
return the column header of 6.
I have been tryinga combination of hlookup and max value but haven't
been able to product the desired results.
Any help would be greatly appreciated.
swjtx--
swjtx
------------------------------------------------------------------------
swjtx's Profile: www.excelforum.com/member.php...oamp;userid=29716
View this thread: www.excelforum.com/showthread...hreadid=494418Hi!
Try this:
=INDEX(A1:A7,MATCH(MAX(B1:B7),B1:B7,0))
Where A1:A7 are the headers, B1:B7 ae the numeric values.
NB: if there are multiple instances of the max value the formula will return
the corresponding header of the first instance.
Biff
quot;swjtxquot; gt; wrote in
message ...
gt;
gt; Hi,
gt;
gt; What I am trying to do is look for the max value in a row and return
gt; the relevant column header
gt;
gt; Example:
gt;
gt; 1-----2-----3-----4------5-----6-----7----
gt;
gt; 35---29----16----3----21----45----5----
gt;
gt; So, the function should look down a row, find the max value of 45 and
gt; return the column header of 6.
gt;
gt; I have been tryinga combination of hlookup and max value but haven't
gt; been able to product the desired results.
gt;
gt; Any help would be greatly appreciated.
gt;
gt; swjtx
gt;
gt;
gt; --
gt; swjtx
gt; ------------------------------------------------------------------------
gt; swjtx's Profile:
gt; www.excelforum.com/member.php...oamp;userid=29716
gt; View this thread: www.excelforum.com/showthread...hreadid=494418
gt;
Ooops!
gt; =INDEX(A1:A7,MATCH(MAX(B1:B7),B1:B7,0))
Should be:
=INDEX(A1:G1,MATCH(MAX(A2:G2),A2:G2,0))
Where A1:G1 are the headers, A2:G2 ae the numeric values.
Biff
quot;Biffquot; gt; wrote in message
...
gt; Hi!
gt;
gt; Try this:
gt;
gt; =INDEX(A1:A7,MATCH(MAX(B1:B7),B1:B7,0))
gt;
gt; Where A1:A7 are the headers, B1:B7 ae the numeric values.
gt;
gt; NB: if there are multiple instances of the max value the formula will
gt; return the corresponding header of the first instance.
gt;
gt; Biff
gt;
gt; quot;swjtxquot; gt; wrote in
gt; message ...
gt;gt;
gt;gt; Hi,
gt;gt;
gt;gt; What I am trying to do is look for the max value in a row and return
gt;gt; the relevant column header
gt;gt;
gt;gt; Example:
gt;gt;
gt;gt; 1-----2-----3-----4------5-----6-----7----
gt;gt;
gt;gt; 35---29----16----3----21----45----5----
gt;gt;
gt;gt; So, the function should look down a row, find the max value of 45 and
gt;gt; return the column header of 6.
gt;gt;
gt;gt; I have been tryinga combination of hlookup and max value but haven't
gt;gt; been able to product the desired results.
gt;gt;
gt;gt; Any help would be greatly appreciated.
gt;gt;
gt;gt; swjtx
gt;gt;
gt;gt;
gt;gt; --
gt;gt; swjtx
gt;gt; ------------------------------------------------------------------------
gt;gt; swjtx's Profile:
gt;gt; www.excelforum.com/member.php...oamp;userid=29716
gt;gt; View this thread:
gt;gt; www.excelforum.com/showthread...hreadid=494418
gt;gt;
gt;
gt;
Hi and Thanks! It worked like a charm.
I inserted the $ so I could drag the formula down without changing the
range (a tip from a different person on this site) like this:
=INDEX(A1:G1,MATCH(MAX($A$2:$G$2),$A$2:$G$2,0))
swjtx--
swjtx
------------------------------------------------------------------------
swjtx's Profile: www.excelforum.com/member.php...oamp;userid=29716
View this thread: www.excelforum.com/showthread...hreadid=494418
Biff to the rescue, again!!!
Neil M
- Sep 29 Fri 2006 20:09
Hlookup/max value?
close
全站熱搜
留言列表
發表留言