# How to find the name with the highest value in Excel

Look up the maximum and return the name beside it: `=XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)`.

**Excel:** `=XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Rep | Q3 sales |  | Top rep |
| Ana | 48200 |  |  |
| Ben | 61750 |  |  |
| Cara | 57300 |  |  |
| Dev | 39800 |  |  |
| Eli | 61750 |  |  |
| Fay | 44150 |  |  |

Formula in E1: `=XLOOKUP(MAX(B2:B7),B2:B7,A2:A7)`

Result: Ben

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

## Other ways

- `=INDEX(A2:A7,MATCH(MAX(B2:B7),B2:B7,0))`: Works in every Excel version.
- `=FILTER(A2:A7,B2:B7=MAX(B2:B7))`: 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.

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

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/name-of-highest-value
