# Greater than question

#### steiny0831

##### New Member
I am trying to figure out the formula to show a value from one cell for the highest number in a column of cells.

For instance a2, a3 and a4 are all names. b2, b3 and b4 are all numbers associated to the names.
In b5 I would like the name from column a that has the highest number from column b.

 Week 1 Dan 174 Phil 198 Steve 168 Phil

<colgroup><col style="width: 100px"><col width="100"></colgroup><tbody>
</tbody>

So I would like Phil to show in b5 since Phil had the highest number for the week.
What formula would I put in b5 to have Phil show in b5?

Thank you for any help,
Jeff

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Code:
=index(a2:a4,match(max(b2:b4),b2:b4))

Thank you, but for some reason if the highest number is in b2 it will not show correctly. In this case it showed Steve in b5 when I entered your formula.
When I messed around with the numbers if the highest number is in b3 or b4 then it shows correctly.
Only for some reason if highest number is in b2 it will not show correctly?
Maybe its a certain setting elsewhere causing this?

I should say it worked fine with your formula in my original sequence of numbers. Its when I switched around for testing that I found if b2 had the highest number it did not show.

Code:
=INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4,0))

I always forget the 0

Yes, that was it. Thank you very much! It works now.

Thanks a ton!

try =INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4,0))

note the extra argument ie the ,0 in the match function. This makes match find an exact match. without this match expects that the values in b2:b4 are sorted in ascending numeric order

Replies
1
Views
165
Replies
20
Views
746
Replies
12
Views
199
Replies
0
Views
147
Replies
1
Views
130

1,202,984
Messages
6,052,916
Members
444,613
Latest member
questionexcelz

### 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