Function Problems

How to Use XLOOKUP to Retrieve Data by Specific Date in Spreadsheets

Steven ParkerSteven Parker Nov 10, 2026 869 views

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.

How to Use XLOOKUP to Retrieve Data for a Specific Date
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.
Before you start

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.

Solution 1Recommended

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.

1
Prepare your lookup values

Ensure your reference ID is typed in one cell (e.g., C8) and your specific target date is in another cell (e.g., D8).

2
Enter the multi-criteria XLOOKUP formula

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")`.

3
Adjust the cell ranges

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 Multiple Criteria (Date and Reference)
Array Sizes Must Match: Ensure that the ranges for both criteria arrays and the return array have the exact same number of rows (e.g., rows 2 to 1000) to avoid #VALUE! errors.
Efficient Data Retrieval with WPS Spreadsheet

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. 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
  2. 2. Open your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook containing the datasets.
  3. 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.
Fully supports advanced formulas including XLOOKUP, VLOOKUP, and INDEX/MATCH.100% compatible with Microsoft Excel (.xlsx) formats and functions.Free to use with a familiar, user-friendly tabbed interface.Lightweight and fast data processing, even with large datasets.
microsoft office alternative - wps office

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.