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

#### jeells102

##### New Member
Hi All,

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

 8am-9am 9am-10am 10am-11am 11am-12pm 12pm-1pm 1pm-2pm 2pm-3pm 3pm-4pm 4pm-5pm 5pm-6pm 1 2 3 4 5 6 7 8 9 10 1 12 72 124 209 322 450 500 644 678 1 2 3 4 5 6 7 8 9 10 11 60 52 85 113 128 50 144 34

<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
Hi,

Assuming your data above starts in A1, try this:

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

#### dcoker

##### New Member
=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!

Replies
2
Views
155
Replies
0
Views
57
Replies
2
Views
433
Replies
2
Views
223
Replies
2
Views
786

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.

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.

### Which adblocker are you using?

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

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