How to Use XLOOKUP to Retrieve Data by Specific Date in Spreadsheets
Question details
The user needs to retrieve specific data from a dataset based on a target date, or a combination of a reference ID and a date, using the XLOOKUP function.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Extracting specific data entries corresponding to distinct dates or multiple conditions across worksheet arrays.
- Observed behavior
- To ensure the function returns the correct record, XLOOKUP must use a lookup value that uniquely identifies the target data, which frequently requires combining a date with another reference criterion using Boolean logic.
Ensure your dataset dates are formatted as actual date values rather than text, and verify the columns containing your lookup criteria to ensure no trailing spaces exist.
Use XLOOKUP with Multiple Criteria (Date and Reference)
Use this advanced method when you need to match both a reference ID and a specific date to pinpoint a unique record.
By multiplying two conditional arrays inside the XLOOKUP function, you can simulate an AND logic operation. The formula searches for the value '1', which represents TRUE for both conditions being met simultaneously.
Ensure your reference ID is typed in one cell (e.g., C8) and your specific target date is in another cell (e.g., D8).
Select the result cell and type `=XLOOKUP(1,('DATA'!$B$2:$B$1000=$C8)*('DATA'!$A$2:$A$1000=$D8),'DATA'!$Z$2:$Z$1000,"Not found")`.
Modify the column letters and row numbers in the formula to match your exact dataset ranges. Press Enter to retrieve your result.

Use XLOOKUP with a Single Date Criteria
Use this straightforward method when the date itself acts as a unique identifier in your dataset.
Master XLOOKUP and Advanced Functions in WPS Office
WPS Spreadsheet fully supports the powerful XLOOKUP function, allowing you to easily retrieve data using single or multiple criteria. It is a highly compatible and efficient tool for managing your datasets.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
- 2. Open your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook containing the datasets.
- 3. Apply the XLOOKUP function: Use the formula bar to input your multi-criteria XLOOKUP formula just as you would in Microsoft Excel to seamlessly retrieve your data.

Frequently Asked Questions
Why is my XLOOKUP returning a 'Not found' or #N/A error?
This usually happens if the target date or reference does not exactly match the data in the lookup array. Check for hidden trailing spaces, ensure your dates are not formatted as text, and confirm the exact lookup values actually exist in your source data.
Can I use XLOOKUP to pull data from different worksheets?
Yes, you can reference different worksheets in your XLOOKUP formula. To do this, prefix the cell range with the sheet name enclosed in single quotes, followed by an exclamation mark, such as 'DATA'!$B:$B.
Why does my multi-criteria XLOOKUP formula return a #VALUE! error?
A #VALUE! error in a multi-criteria XLOOKUP typically occurs when the lookup arrays and the return array are not the same size. Ensure all ranges share the exact same starting and ending rows, for example, $A$2:$A$1000 and $Z$2:$Z$1000.
Does WPS Spreadsheet fully support the XLOOKUP function?
Yes, modern versions of WPS Spreadsheet fully support the XLOOKUP function, allowing you to perform advanced, flexible data lookups—including multi-criteria arrays—just like you do in Microsoft Excel.




