INDEX MATCH (or not?) to return column header based on the highest value in the row

TheGent

New Member
Joined
Oct 23, 2017
Messages
10
I have two worksheets, the first contains a list of items, the second a data set.

I am wanting to create a formula in sheet one, which looks up to the data set, finds the highest value in that row and then returns the column header (a date) from this data set.

I have included what would be the correct entries to return on worksheet one in red.

Can this be done?


[TABLE="width: 820"]
<colgroup><col><col span="8"></colgroup><tbody>[TR]
[TD]Worksheet 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Section[/TD]
[TD]Result[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Eggs[/TD]
[TD]04/10/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bread[/TD]
[TD]20/09/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Milk[/TD]
[TD]27/09/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Worksheet 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Section[/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]Eggs[/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]Bread[/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]Milk[/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]
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Worksheet one should be as below, some reasons dates changed when I formatted.

[TABLE="width: 197"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Worksheet 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Section[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]Eggs[/TD]
[TD]18/10/2017[/TD]
[/TR]
[TR]
[TD]Bread[/TD]
[TD]18/10/2017[/TD]
[/TR]
[TR]
[TD]Milk[/TD]
[TD]04/10/2017[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Try this in Worksheet 1, B2 and filled down

=INDEX(Sheet2!$B$1:$I$1,MATCH(MAX(Sheet2!B2:I2),Sheet2!B2:I2,0))
 
Upvote 0

Forum statistics

Threads
1,225,739
Messages
6,186,738
Members
453,369
Latest member
juliewar

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