Function Problems

Return Column Headers for Minimum Values in an Excel Row

John WilsonJohn Wilson Nov 12, 2026 870 views

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.

Return Column Headers for Minimum Values in an Excel Row
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click the cell where you want the comma-separated headers to appear, such as F2.

2
Enter the minimum-header formula

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.

3
Fill the formula down

Drag the fill handle from the result cell down the column to calculate the matching minimum headers for additional rows.

Return all headers tied to the minimum value in the same row
Tied minimum values are included: If two or more values equal the minimum in a row, the formula returns every matching header in the same result cell.
WPS Spreadsheet formulas

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. 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. 2. Choose a result cell: Click an empty cell beside the first data row, such as F2, to hold the comma-separated result.
  3. 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. 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. 5. Fill the formula down: Drag the fill handle down the result column to calculate minimum-value headers for each row.
Use MIN, FILTER, and TEXTJOIN to return all headers tied to a row minimum.Use XLOOKUP to match records even when source-sheet rows are in a different order.Open and edit Microsoft Excel .xlsx and .xls files with compatible spreadsheet formatting.Use a familiar spreadsheet interface for formulas, fill handles, and multi-sheet references.
microsoft office alternative - wps office

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.