WPS Spreadsheet: Return Multiple Column Headers for TRUE Values
Question details
The user needs to return multiple table column headers when the selected item's corresponding values are TRUE across a row.

- 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.
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.
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.
In WPS Spreadsheet, click the cell where the matching header list should begin, such as J2.
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.
Press Enter. WPS Spreadsheet returns the headers associated with TRUE values and spills them downward into the empty cells below the formula.
Use LET and XMATCH for a reusable row-based formula
Use this alternative when you want to name each calculation step and make a more complex table formula easier to maintain.
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. Open the spreadsheet: Launch WPS Office and open the workbook containing the item table.
- 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. Enter the formula: Click an empty output cell and enter =TOCOL(FILTER(Table16[[#Headers],[Granite]:[Wood]],XLOOKUP(I2,Table16[Item],Table16[[Granite]:[Wood]]))).
- 4. Review the spilled results: Press Enter and check that the matching headers appear vertically below the formula cell.

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.




