Index/Match and return header

eaje92

New Member
Joined
Feb 19, 2018
Messages
16
Hi i would like some help with returning column headers based on the highest value in the specific row that will change constantly. Much appreciated!

An example would be:

[TABLE="class: cms_table, width: 820"]
<tbody>[TR]
[TD][TABLE="class: cms_table, width: 820"]
<tbody>[TR]
[TD]State[/TD]
[TD="align: right"]16/08/2017[/TD]
[TD="align: right"]13/09/2017[/TD]
[TD="align: right"]20/09/2017[/TD]
[TD="align: right"]27/09/2017[/TD]
[TD="align: right"]04/10/2017[/TD]
[TD="align: right"]11/10/2017[/TD]
[TD="align: right"]18/10/2017[/TD]
[TD="align: right"]20/10/2017[/TD]
[/TR]
[TR]
[TD]1 [/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 0 [/TD]
[TD] 11[/TD]
[TD] 19[/TD]
[TD] 112[/TD]
[TD] 0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 20[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 68[/TD]
[TD] 0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 0[/TD]
[TD] 71[/TD]
[TD] 7[/TD]
[TD] 39[/TD]
[TD] 0[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]


For my results,

[TABLE="class: cms_table, width: 820"]
<tbody>[TR]
[/TR]
[TR]
[TD]State[/TD]
[TD]Result[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2 (dynamically changing)[/TD]
[TD]18/10/2017







[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Excel 2010
ABCDEFGHIJKL
1State16/08/201713/09/201720/09/201727/09/20174/10/201711/10/201718/10/201720/10/2017218/10/2017
21000011191120
320002000680
430000717390
Sheet26
Cell Formulas
RangeFormula
L1=INDEX(B1:I1,MATCH(MAX(INDEX(B2:I4,MATCH(K1,A2:A4,0),)),INDEX(B2:I4,MATCH(K1,A2:A4,0),),0))
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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