How to find the name with the highest value in Excel
Formula (Excel and Google Sheets)
=XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)Look up the maximum and return the name beside it: =XLOOKUP(MAX(B2:B7),B2:B7,A2:A7).
- Result on the example
- Ben in
E1 - Works in
- Excel 2021, 2024 and Microsoft 365
- Google Sheets
- Same formula
See it work
The formula is already in E1. Change any input and the result updates, or edit the formula to experiment.
How it works
MAX finds the top sales figure, $61,750. XLOOKUP searches the sales column for that figure and returns the name on the same row. Ben and Eli are tied, and the lookup returns the first one in the list.
=XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)Result"Ben"
B2:B76 rows × 1 col: $48,200, $61,750, $57,300, $39,800, …A range: 6 cells in one column.
MAX(B2:B7)61750MAX: Largest number.- number1
B2:B76 rows × 1 col: $48,200, $61,750, $57,300, $39,800, …
- number1
A2:A76 rows × 1 col: "Ana", "Ben", "Cara", "Dev", …A range: 6 cells in one column.
XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)"Ben"XLOOKUP: Searches one range and returns the matching item from another.- lookup_value
MAX(B2:B7)61750 - lookup_array
B2:B76 rows × 1 col: $48,200, $61,750, $57,300, $39,800, … - return_array
A2:A76 rows × 1 col: "Ana", "Ben", "Cara", "Dev", …
- lookup_value
In Google Sheets
The same formula works in Google Sheets: =XLOOKUP(MAX(B2:B7),B2:B7,A2:A7). We ran it in Google Sheets mode on the same data and it returns Ben.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =INDEX(A2:A7,MATCH(MAX(B2:B7),B2:B7,0)) | Ben | Works in every Excel version. |
| =FILTER(A2:A7,B2:B7=MAX(B2:B7)) | spills 2 × 1Different result | Returns everyone tied for the top, one per row. Both tied reps, Ben and Eli. |
Common mistakes
- A lookup returns only the first of tied names. Use FILTER if ties are possible and matter.
- MAX ignores text, so a figure stored as text is skipped. Convert it to a number first.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Find the name with the highest value
E1, return the name of the rep with the highest Q3 sales.Questions
How do I find the name with the lowest value?
Use MIN: =XLOOKUP(MIN(B2:B7),B2:B7,A2:A7). To skip zeros, use MINIFS(B2:B7,B2:B7,">0").
How do I return the top name for one region?
Use MAXIFS and add the region as a second test; see the top seller in each region.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.