Index Column Heading

agutts6

New Member
Joined
Jun 19, 2011
Messages
19
<table style="width: 576px; height: 1px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="9"><tbody></tbody></table>How do I look up a column heading with a maximum value? Here's hoping this displays decently...

<table border="0" cellpadding="0" cellspacing="0"><tbody> </tbody></table>
<table width="320" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="5"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" width="64" height="20">Name</td> <td style="width: 48pt;" width="64">2B</td> <td style="width: 48pt;" width="64">SS</td> <td style="width: 48pt;" width="64">3B</td> <td style="width: 48pt;" width="64">1B</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Joe</td> <td align="right">23</td> <td align="right">45</td> <td align="right">0</td> <td align="right">0</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Steve</td> <td align="right">0</td> <td align="right">0</td> <td align="right">60</td> <td align="right">0</td> </tr> </tbody></table>

Basically, I want it to return 'SS' for Joe, and '3B' for Steve.

Much appreciated.

--AG
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
<TABLE style="WIDTH: 576px; HEIGHT: 1px" cellSpacing=0 cellPadding=0 border=0><COLGROUP><COL style="WIDTH: 48pt" span=9 width=64><TBODY></TBODY></TABLE>How do I look up a column heading with a maximum value? Here's hoping this displays decently...

<TABLE cellSpacing=0 cellPadding=0 border=0><TBODY></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=320 border=0><COLGROUP><COL style="WIDTH: 48pt" span=5 width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="WIDTH: 48pt; HEIGHT: 15pt" width=64 height=20>Name</TD><TD style="WIDTH: 48pt" width=64>2B</TD><TD style="WIDTH: 48pt" width=64>SS</TD><TD style="WIDTH: 48pt" width=64>3B</TD><TD style="WIDTH: 48pt" width=64>1B</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="HEIGHT: 15pt" height=20>Joe</TD><TD align=right>23</TD><TD align=right>45</TD><TD align=right>0</TD><TD align=right>0</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="HEIGHT: 15pt" height=20>Steve</TD><TD align=right>0</TD><TD align=right>0</TD><TD align=right>60</TD><TD align=right>0</TD></TR></TBODY></TABLE>

Basically, I want it to return 'SS' for Joe, and '3B' for Steve.

Much appreciated.

--AG
Try this...

Book1
ABCDEF
1Name2BSS3B1BPosition
2Joe234500SS
3Steve006003B
Sheet1

Formula entered in F2 and copied down:

=INDEX(B$1:E$1,MATCH(MAX(B2:E2),B2:E2,0))

Note that if there are multiple instances of the max value in a row the formula will match the left -most instance.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,331
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top