Return the Name Next to the Highest Value in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
To return the name next to the highest value, find the maximum with MAX, find its row with MATCH, and return the name from that row with INDEX: =INDEX(A2:A8,MATCH(MAX(C2:C8),C2:C8,0)). In Excel 2021 or Microsoft 365, =XLOOKUP(MAX(C2:C8),C2:C8,A2:A8) does the same. Swap MAX for MIN to get the name of the lowest value.
Key takeaways
- MAX finds the highest value, MATCH finds its position, and INDEX returns the name in that position.
- Always use 0 as MATCH's last argument for an exact match.
- XLOOKUP(MAX(values),values,names) is the shorter version in Excel 2021 and Microsoft 365.
- With ties, both formulas return only the first name. Use FILTER to list every tied name.
- For the top name in one group, combine MAXIFS with a lookup that checks the group too.
On this page+
To return the name of the highest value in Excel, you combine three functions: MAX finds the top number, MATCH finds which row it's in, and INDEX returns the name from that row. The formula is =INDEX(A2:A8,MATCH(MAX(C2:C8),C2:C8,0)), and Microsoft 365 users can use a shorter XLOOKUP. This guide shows both, plus the lowest value, ties, the top name per group and a top 3 list.
The sample data#
All the examples use this sales list in A1:C8:
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Region | Sales |
| 2 | Amara | North | 42,500 |
| 3 | Ben | South | 47,800 |
| 4 | Chen | North | 53,100 |
| 5 | Dina | East | 39,400 |
| 6 | Eli | South | 50,250 |
| 7 | Femi | East | 44,600 |
| 8 | Gina | North | 36,700 |
MAX alone tells you the top sales figure is 53,100. The question is who made it.
How to return the name of the highest value with INDEX and MATCH#
Use INDEX and MATCH around MAX. This works in every version of Excel:
=INDEX(A2:A8,MATCH(MAX(C2:C8),C2:C8,0))Read it from the inside out:
MAX(C2:C8)returns the highest sales figure: 53,100. The MAX function guide covers it in detail.MATCH(53100,C2:C8,0)finds where that value sits in the list: position 3. The0means exact match. See the MATCH function guide.INDEX(A2:A8,3)returns the 3rd name in the list: Chen. See the INDEX function guide.
The name range and the value range must start on the same row and be the same size. If names are in A2:A8, values must be in C2:C8, not C1:C7, or the formula returns the wrong person. For a full walkthrough of the pattern, read the guide to INDEX MATCH in Excel.
The shorter XLOOKUP version#
In Excel 2021 or Microsoft 365, XLOOKUP does the lookup in one function:
=XLOOKUP(MAX(C2:C8),C2:C8,A2:A8)XLOOKUP looks for the MAX value in C2:C8 and returns the matching name from A2:A8: Chen. It defaults to an exact match, so you don't need a 0. The guide to the XLOOKUP function covers its other options.
VLOOKUP can't do this with this layout, because the names are to the left of the values and VLOOKUP only looks to the right.
How to return the name of the lowest value#
Swap MAX for MIN and keep everything else:
=INDEX(A2:A8,MATCH(MIN(C2:C8),C2:C8,0))MIN returns 36,700, which is in position 7, so the result is Gina. The guide to AVERAGE, MIN and MAX explains these summary functions, and the AVERAGE, MIN and MAX lesson lets you practise them.
What happens when two people tie#
INDEX MATCH and XLOOKUP stop at the first match from the top. If Eli also had 53,100, both formulas would still return Chen, because Chen is higher in the list. Nothing tells you there was a tie.
To list every name with the highest value, use FILTER (Excel 2021 or Microsoft 365):
=FILTER(A2:A8,C2:C8=MAX(C2:C8))FILTER keeps every row where the sales equal the maximum, and the names spill into the cells below. To show them in one cell, wrap it in TEXTJOIN:
=TEXTJOIN(", ",TRUE,FILTER(A2:A8,C2:C8=MAX(C2:C8)))With a tie this returns Chen, Eli. Without one, it returns just Chen. To check for a tie in any version, =COUNTIF(C2:C8,MAX(C2:C8)) returns how many rows share the top value.
The name of the highest value in one group#
To find the top rep in one region, first get that region's highest value with MAXIFS (Excel 2019 or later):
=MAXIFS(C2:C8,B2:B8,"South")This returns 50,250. Then look up the name, checking both the region and the value:
=XLOOKUP(1,(B2:B8="South")*(C2:C8=MAXIFS(C2:C8,B2:B8,"South")),A2:A8)Each comparison returns TRUE or FALSE. Multiplying them gives 1 only in the row where both are true, and XLOOKUP finds that 1. The result is Eli.
Why not just MATCH(MAXIFS(...),C2:C8,0)? Because the same number could appear in another region higher up the list, and MATCH would return that person instead. Checking the region as well avoids the trap. The guide to MAXIFS and MINIFS has more examples of conditional maximums.
The names of the top 3 values#
LARGE returns the 2nd, 3rd or nth highest value, so you can use it in place of MAX:
=INDEX($A$2:$A$8,MATCH(LARGE($C$2:$C$8,E2),$C$2:$C$8,0))Put 1, 2 and 3 in E2:E4 and fill the formula down. You get Chen, Eli and Ben (53,100, 50,250 and 47,800). With ties, this repeats the first tied name, so check for duplicates. The guide to top N lists with LARGE and SMALL handles that case.
In Microsoft 365, one formula does it:
=TAKE(SORTBY(A2:A8,C2:C8,-1),3)SORTBY sorts the names by sales from highest to lowest, and TAKE keeps the first 3. TAKE needs Microsoft 365 or Excel 2024.
Common mistakes#
These are the slips that most often return the wrong name:
- Leaving out the 0 in MATCH. Without it, MATCH uses an approximate match, which needs sorted data and can return the wrong row.
- Ranges that don't line up. A2:A8 with C3:C9 shifts every result by one row.
- Numbers stored as text. MAX ignores them, so a text "60,000" can't be the top value even if it's the biggest.
- Ignoring ties. Check with COUNTIF before you report one winner.
- Using MAX on a whole column with a total row. If C9 holds the total, MAX returns the total and the name next to it is "Total".
Practise it#
This pattern, a lookup wrapped around MAX or MIN, appears in many Excel tests. Practise INDEX and MATCH in a live spreadsheet: you build lookups and the sheet checks each formula instantly. Then try the XLOOKUP version in the XLOOKUP lesson, and the summary functions in the AVERAGE, MIN and MAX lesson.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Who made the most sales? Click F2 and return the name from A2:A8 next to the highest value in C2:C8, using INDEX, MATCH and MAX.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Sales | ||||||
| 2 | Top rep | ||||||
| 3 | |||||||
| 4 | |||||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 | |||||||
| 10 | |||||||
| 11 |
Tip: Work from the inside out: MAX(C2:C8) finds the value, MATCH(...,C2:C8,0) finds its row, INDEX(A2:A8,...) returns the name.
Practise this in a lesson
Frequently asked questions
How do I find the name with the highest value in Excel?
Use =INDEX(A2:A8,MATCH(MAX(C2:C8),C2:C8,0)), where A holds names and C holds values. In Microsoft 365 you can also use =XLOOKUP(MAX(C2:C8),C2:C8,A2:A8).
How do I find the name with the lowest value?
Replace MAX with MIN: =INDEX(A2:A8,MATCH(MIN(C2:C8),C2:C8,0)). The rest of the formula stays the same.
What if two people have the highest value?
INDEX MATCH and XLOOKUP return only the first match from the top. To list everyone who tied, use =FILTER(A2:A8,C2:C8=MAX(C2:C8)) in Excel 2021 or Microsoft 365.
Can VLOOKUP return the name of the highest value?
Only if the values are to the left of the names, because VLOOKUP can't look left. With names in the first column, use INDEX MATCH or XLOOKUP instead.
How do I get the names of the top 3 values?
In Microsoft 365, sort the names by value and take the first three: =TAKE(SORTBY(A2:A8,C2:C8,-1),3). In older versions, use INDEX MATCH with LARGE(C2:C8,1), 2 and 3.