How to return the column header of the lowest value in a row in Excel
Formula (Excel and Google Sheets)
=XLOOKUP(MIN(B2:D2),B2:D2,B$1:D$1)Look up the row's minimum in the row and return the header above it: =XLOOKUP(MIN(B2:D2),B2:D2,B$1:D$1).
- Result on the example
- one result per row in
E2, filled down toE6 - Works in
- Excel 2021, 2024 and Microsoft 365
- Google Sheets
- Same formula
See it work
The formula is already in E2, filled down to E6. Change any input and the result updates, or edit the formula to experiment.
How it works
MIN finds the lowest price in the row, $39.90 for copy paper. XLOOKUP looks for that price across B2:D2 and returns the header in the same column of B$1:D$1. The $ keeps the header row fixed while the rows change.
=XLOOKUP(MIN(B2:D2),B2:D2,B$1:D$1)Result"BrightCo"
B2:D21 row × 3 cols: $42.50, $39.90, $44.25A range: 3 cells in one row.
MIN(B2:D2)39.9MIN: Smallest number.- number1
B2:D21 row × 3 cols: $42.50, $39.90, $44.25
- number1
B$1:D$11 row × 3 cols: "Acme Supply", "BrightCo", "Corvex"A range: 3 cells in one row.
XLOOKUP(MIN(B2:D2),B2:D2,B$1:D$1)"BrightCo"XLOOKUP: Searches one range and returns the matching item from another.- lookup_value
MIN(B2:D2)39.9 - lookup_array
B2:D21 row × 3 cols: $42.50, $39.90, $44.25 - return_array
B$1:D$11 row × 3 cols: "Acme Supply", "BrightCo", "Corvex"
- lookup_value
In Google Sheets
The same formula works in Google Sheets: =XLOOKUP(MIN(B2:D2),B2:D2,B$1:D$1). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =INDEX(B$1:D$1,MATCH(MIN(B2:D2),B2:D2,0)) | BrightCo, Corvex, BrightCo… | Works in every Excel version. |
Common mistakes
- Ties return the first supplier from the left.
- MIN skips blank cells, so a supplier that doesn't carry the item is ignored. A price of 0 is not skipped and would win.
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.
Return the column header of the lowest value in a row
E2, return the name of the supplier (from row 1) with the lowest price for the item, then fill down to E6.Questions
How do I return the header of the highest value?
Use MAX instead of MIN.
How do I list every supplier tied for the lowest price?
Filter the headers: =TEXTJOIN(", ",TRUE,FILTER(B$1:D$1,B2:D2=MIN(B2:D2))).
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.