Function Problems

WPS Spreadsheet: Return Multiple Column Headers for TRUE Values

Huma Ashraf ChHuma Ashraf Ch Nov 12, 2026 869 views

Question details

The user needs to return multiple table column headers when the selected item's corresponding values are TRUE across a row.

WPS Spreadsheet: Return Multiple Column Headers for TRUE Values
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A selected item, such as Countertop, is matched to a row in an Excel-style table, and the headers for all TRUE values need to spill vertically.
Observed behavior
The required matching headers are not yet returned as a vertical spilled list.
Before you start

Confirm that the item names and TRUE/FALSE values are stored in a table, and identify the input cell containing the selected item. Leave the cells below the formula empty so the returned headers can spill.

Solution 1Recommended

Use XLOOKUP, FILTER, and TOCOL to spill matching headers

Use this formula when the selected item is in a table and you want every header whose corresponding row value is TRUE.

XLOOKUP retrieves the TRUE/FALSE row for the selected item, FILTER keeps only the headers associated with TRUE values, and TOCOL converts the result into a vertical spilled list.

1
Select the output cell

In WPS Spreadsheet, click the cell where the matching header list should begin, such as J2.

2
Enter the dynamic-array formula

Enter =TOCOL(FILTER(Table16[[#Headers],[Granite]:[Wood]],XLOOKUP(I2,Table16[Item],Table16[[Granite]:[Wood]]))) and replace Table16, I2, Item, Granite, and Wood with the names used in your table.

3
Confirm and review the spill

Press Enter. WPS Spreadsheet returns the headers associated with TRUE values and spills them downward into the empty cells below the formula.

Example result: If I2 contains Countertop, the formula returns each material header marked TRUE in the Countertop row, such as Granite or Wood.

Create a spilled TRUE-match header list in WPS Spreadsheet

WPS Spreadsheet can use XLOOKUP, FILTER, and TOCOL to match an item, select its TRUE values, and return the corresponding table headers as a vertical spilled list.

  1. 1. Open the spreadsheet: Launch WPS Office and open the workbook containing the item table.
  2. 2. Check the table and input cell: Confirm the table name, Item column, TRUE/FALSE material columns, and the cell containing the selected item.
  3. 3. Enter the formula: Click an empty output cell and enter =TOCOL(FILTER(Table16[[#Headers],[Granite]:[Wood]],XLOOKUP(I2,Table16[Item],Table16[[Granite]:[Wood]]))).
  4. 4. Review the spilled results: Press Enter and check that the matching headers appear vertically below the formula cell.
Return multiple matching headers automatically from one formulaUse dynamic arrays to keep results updated when the selected item changesWork with familiar Excel-style table references and functionsOpen and edit Microsoft Excel XLSX files with compatible spreadsheet formatting
microsoft office alternative - wps office

Frequently Asked Questions

What does the XLOOKUP part of the formula do?

XLOOKUP finds the selected item in the table's Item column and returns the corresponding TRUE/FALSE values across the material columns.

Why is FILTER used with the table headers?

FILTER keeps only the headers whose corresponding values in the matched row are TRUE. The header range and lookup-result range must cover the same columns.

Why does the result appear vertically?

TOCOL converts the filtered header range into a single column, allowing the matching headers to spill downward from the formula cell.

What should I do if the formula returns a spill error?

Select the formula cell and check the cells below it. Remove any existing values, merged cells, or other content blocking the spilled results.

Can I change the selected item without rewriting the formula?

Yes. If the formula references an input cell such as I2, replace that cell's value with another item from the table's Item column, and the spilled header list updates automatically.