Return Column Headers for Minimum Values in an Excel Row
Question details
Return all column headers whose values equal the minimum value in a selected Excel row, combining tied headers into one comma-separated result.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user needs to identify the lowest value or tied lowest values across a row and return the corresponding headers. Source rows may need to be matched by a state or other lookup key stored in a different order on another worksheet.
- Observed behavior
- The desired result is a single cell containing every header associated with the row minimum, such as "Blue, Green" when both values are tied for the lowest.
Use Microsoft 365 or a spreadsheet version that supports the dynamic-array functions FILTER and XLOOKUP. Confirm that the header range and the row of values have the same number of columns.
Return all headers tied to the minimum value in the same row
Use this formula when the headers and values are already on the same worksheet and no row lookup is needed.
TEXTJOIN combines the matching headers, FILTER selects the headers whose corresponding values equal the row minimum, and MIN finds that minimum value.
Click the cell where you want the comma-separated headers to appear, such as F2.
Enter =TEXTJOIN(", ",TRUE,FILTER('Sample Sheet 1'!B$1:E$1,'Sample Sheet 1'!B2:E2=MIN('Sample Sheet 1'!B2:E2))) and press Enter.
Drag the fill handle from the result cell down the column to calculate the matching minimum headers for additional rows.

Match a row by state before returning its minimum-value headers
Use this version when the lookup key, such as a state name, is ordered differently on the current sheet and the source worksheet.
Find Minimum-Value Headers with WPS Spreadsheet
WPS Spreadsheet can use dynamic formulas to identify the lowest value in a row and return every corresponding header in one cell. Enter the formula in a result column, then fill it down to process additional records efficiently.
- 1. Open the workbook in WPS Spreadsheet: Open the Excel workbook in WPS Office and select the worksheet where you want to display the returned headers.
- 2. Choose a result cell: Click an empty cell beside the first data row, such as F2, to hold the comma-separated result.
- 3. Enter the row minimum formula: Type =TEXTJOIN(", ",TRUE,FILTER(B$1:E$1,B2:E2=MIN(B2:E2))) and press Enter, adjusting the ranges to match your data.
- 4. Use a lookup formula when rows are reordered: For data on another sheet, use XLOOKUP to return the matching value row before applying MIN, FILTER, and TEXTJOIN.
- 5. Fill the formula down: Drag the fill handle down the result column to calculate minimum-value headers for each row.

Frequently Asked Questions
Why does the formula return more than one column header?
The FILTER condition compares every value in the row with MIN(range). If multiple cells equal the lowest value, every corresponding header is returned, and TEXTJOIN separates them with commas.
Can I return the header for the maximum value instead?
Yes. Replace MIN with MAX in the formula, for example: =TEXTJOIN(", ",TRUE,FILTER(B$1:E$1,B2:E2=MAX(B2:E2))).
How can I match states when the two worksheets are sorted differently?
Use XLOOKUP with the state on the current sheet as the lookup value and the source sheet's state column as the lookup array. XLOOKUP returns the correct value row regardless of row order.
What happens if FILTER returns no matching header?
With a valid numeric row, MIN always matches at least one value. If the row contains errors or incompatible data, correct those cells first or wrap the formula with IFERROR to display a custom message.




