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;

8am-9am9am-10am10am-11am11am-12pm12pm-1pm1pm-2pm2pm-3pm3pm-4pm4pm-5pm5pm-6pm
12345678910
11272124209322450500644678
12345678910
116052851131285014434

<colgroup><col><col><col><col><col><col span="5"></colgroup><tbody>
</tbody>

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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,951
Hi,

Assuming your data above starts in A1, try this:

=INDEX(A1:J1,1,MATCH(MAX(A5:J5),A5:J5,0))
 

dcoker

New Member
Joined
Dec 13, 2018
Messages
29
=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!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,701
Messages
5,833,215
Members
430,197
Latest member
edeibold

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
Top