Finding the Highest Value in a Row, and then return the value of cell above it

jeells102

New Member
Joined
Mar 12, 2019
Messages
1
Hi All,

So I've got a table in excel that is laid out like below;

[TABLE="width: 711"]
<colgroup><col><col><col><col><col><col span="5"></colgroup><tbody>[TR]
[TD]8am-9am[/TD]
[TD]9am-10am[/TD]
[TD]10am-11am[/TD]
[TD]11am-12pm[/TD]
[TD]12pm-1pm[/TD]
[TD]1pm-2pm[/TD]
[TD]2pm-3pm[/TD]
[TD]3pm-4pm[/TD]
[TD]4pm-5pm[/TD]
[TD]5pm-6pm[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]72[/TD]
[TD="align: right"]124[/TD]
[TD="align: right"]209[/TD]
[TD="align: right"]322[/TD]
[TD="align: right"]450[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]644[/TD]
[TD="align: right"]678[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]52[/TD]
[TD="align: right"]85[/TD]
[TD="align: right"]113[/TD]
[TD="align: right"]128[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]34
[/TD]
[/TR]
</tbody>[/TABLE]

And the last row is the difference between Column B - Column A. What I want to do, in a different cell, is say "Find the highest number in the row, and then return the time in which that happened in"

So in the table above, Excel would find that 144 was the highest number, and it would return 4pm-5pm. I cannot think of a way to do this. Does anyone have any ideas?

I think I'm gonna have to do a index and match, but I have no clue on how best to tackle that.

Any ideas would be greatly appreciated
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
=INDEX(A1:J1,1,MATCH(max(A5:J5),A5:J5,0))

This is given that the data is in row 1 starting with column A.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
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