Function Problems

How to Use XLOOKUP in WPS Spreadsheets to Match Two Columns and Update a Sheet

Olivia MillerOlivia Miller Nov 13, 2026 871 views

Question details

Return a value from a master sheet when two fields, such as an ID and a program, match values on another worksheet.

How to Use XLOOKUP in WPS Spreadsheets to Match Two Columns and Update a Sheet
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user maintains a master table and a detail sheet, and needs the detail sheet to automatically show the matching value when both ID and Program match.
Observed behavior
The expected formula should update automatically when the master data changes.
Before you start

Open your workbook in WPS Spreadsheets and confirm that both worksheets contain the two lookup columns, for example ID and Program. If you plan to use Excel tables, make sure each range has a header row before converting it to a table.

Solution 1Recommended

Use XLOOKUP with concatenated criteria and WPS tables

Best for workbooks that will grow or be updated, because table structured references adjust automatically and keep the formula readable.

Convert the lookup ranges to tables so the formula uses column names instead of fixed cell references. The concatenation inside XLOOKUP checks both ID and Program as a single combined key.

1
Convert both ranges to tables

Select the result data range, go to Home > Format as Table, choose a style, and confirm the range has headers. Repeat this for the master data range.

2
Name the master table

Select the master table, go to Table Tools > Table Name, and rename it to Table1 for the example.

3
Enter the XLOOKUP formula

In the result table, click the first cell of the target column and enter =XLOOKUP([@ID]&[@Program],Table1[ID]&Table1[Program],Table1[% of hours],"").

4
Press Enter and verify

Press Enter and copy the formula down the result column. WPS Spreadsheets updates the returned values when the master table changes.

Use XLOOKUP with concatenated criteria and WPS tables
Automatic updates: Because the formula references a table and uses XLOOKUP, the returned values refresh automatically when the master data changes.
WPS Spreadsheets function guide

Use XLOOKUP in WPS Spreadsheets to match two columns and return the correct value

WPS Spreadsheets supports XLOOKUP in .xlsx workbooks, so you can replace helper columns with a concatenated lookup that returns the correct value only when ID and Program both match.

  1. 1. Open your workbook: Launch WPS Office, open the .xlsx workbook containing the master and result sheets.
  2. 2. Convert both ranges to tables: Select each data range and go to Home > Format as Table; confirm the ranges have headers.
  3. 3. Enter the XLOOKUP formula: Click the first result cell and type =XLOOKUP([@ID]&[@Program],Table1[ID]&Table1[Program],Table1[% of hours],"").
  4. 4. Fill down and verify: Press Enter, copy the formula down the result column, and change a master value to confirm the result updates.
Matches two columns with one formula instead of helper columnsReturns values that update automatically when the master table changesFully compatible with Excel .xlsx formulas and workbook structureFree, lightweight WPS Office environment for editing your spreadsheets
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Spreadsheets support XLOOKUP?

Yes, current versions of WPS Spreadsheets support XLOOKUP when you open or create an .xlsx workbook. If the function is not recognized, update WPS Office to the latest version.

How can I match two columns without creating a helper column?

Concatenate the two lookup columns directly inside XLOOKUP. For example, use A2&C2 as the lookup value and Sheet1!$A$2:$A$200&Sheet1!$C$2:$C$200 as the lookup array.

Why does the formula return #N/A even though the values appear to match?

Check for extra spaces, line breaks, or number-as-text mismatches in the key columns. Use TRIM or CLEAN to clean text values before matching.

Do I need to press Ctrl+Shift+Enter for this XLOOKUP formula?

No. In modern WPS Spreadsheets and Excel 365, XLOOKUP handles arrays natively, so press Enter normally.

Can the result update automatically when the master sheet changes?

Yes. XLOOKUP is a live formula, so when the master table values change, the returned results recalculate automatically in WPS Spreadsheets.