How to Populate WPS Spreadsheet Cells When Dates Match on Another Worksheet
Question details
The user wants to automatically retrieve a value from one worksheet into another when a date in the destination sheet matches a date in the source sheet.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The user maintains two worksheets with date-based records and needs values from a source worksheet to appear on a destination worksheet when the dates are equal.
- Observed behavior
- Currently, matching values must be entered manually because no lookup formula or change event is in place to populate the destination cells automatically.
Confirm that both date columns use the same date format and that the source data range includes the date column and the value column you want to return.
Use XLOOKUP to Fill Cells by Matching Dates
Best for most WPS Spreadsheets versions that support XLOOKUP; it returns the corresponding value for the first matching date.
XLOOKUP searches the source date column for the date entered in the destination sheet and returns the value from the same row. The empty-string fallback keeps the cell blank instead of showing #N/A.
Click the cell where the matched value should appear, such as B2 on the destination worksheet.
Type =XLOOKUP(A2,Worksheet_1!$A$2:$A$100,Worksheet_1!$B$2:$B$100,"") and press Enter.
Replace A2 with the destination date cell, Worksheet_1 with the source sheet name, $A$2:$A$100 with the source date range, and $B$2:$B$100 with the source value range. Use the fill handle to copy the formula down.

Use INDEX and MATCH When XLOOKUP Is Not Available
Use this formula for older WPS Spreadsheets or Excel compatibility when XLOOKUP is unavailable.
Update the Destination Cell Automatically with a Worksheet_Change Macro
Use this only when your WPS Office edition supports macros and you need the value written by code whenever a specific source cell changes.
Fill Cells by Matching Dates in WPS Spreadsheets
Use WPS Spreadsheets' built-in XLOOKUP or INDEX/MATCH functions to automatically pull values from one worksheet to another when dates match, without manual copying.
- 1. Open your workbook in WPS Spreadsheets: Launch WPS Office, open the workbook that contains both worksheets, and click the destination cell.
- 2. Enter the lookup formula: Type =XLOOKUP(A2,Worksheet_1!$A$2:$A$100,Worksheet_1!$B$2:$B$100,"") and press Enter, adjusting the ranges to your sheet names.
- 3. Copy the formula down: Drag the fill handle from the formula cell down to apply the date lookup to all rows.
- 4. Verify matched values: Check that the destination cells show the correct source values and update when source dates or values change.

Frequently Asked Questions
Does WPS Spreadsheets support the XLOOKUP function?
Yes, current versions of WPS Spreadsheets support XLOOKUP. You can enter it directly in the formula bar and use the same arguments as in Excel.
Why does my lookup return #N/A even though the dates look the same?
The dates may be stored as text in one column. Select the date columns and set both to Date format, or use DATEVALUE to convert text dates before matching.
Can I use a macro to update cells when a date changes?
In WPS Office editions that support macros, you can use a Worksheet_Change event in the macro editor, but formula-based XLOOKUP or INDEX/MATCH is usually simpler and more reliable.
How do I return multiple columns when the dates match?
Use XLOOKUP with a multi-column return array, or add separate INDEX/MATCH formulas for each value column and reference the same date match position.
Will this work when the source worksheet has duplicate dates?
XLOOKUP returns the first match by default. If duplicates are possible, add a unique key or use a helper column to make each date record distinct before looking up.




