How to Use XLOOKUP with Multiple Criteria and Partial Text Match
Question details
The user wants to perform an XLOOKUP using multiple conditions, including a partial text match on one of the criteria.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Looking up specific data in a dataset where multiple criteria must be met, and one criterion requires matching only the first character of a string.
- Observed behavior
- To retrieve the correct value, XLOOKUP must process multiple Boolean arrays multiplied together, ensuring all lookup arrays have the exact same dimensions.
Ensure that all your data ranges have the exact same number of rows before writing the formula to avoid #VALUE! errors.
Use XLOOKUP with Boolean Arrays and the LEFT Function
Multiply Boolean arrays to create multiple criteria logic, and use the LEFT function to handle the partial text match.
XLOOKUP can test several conditions simultaneously by multiplying Boolean arrays (which return 1 for TRUE and 0 for FALSE). When you multiply these conditions together, only rows where all conditions are TRUE will result in a 1. By setting the XLOOKUP lookup_value to 1, you can find the exact row that meets all your criteria.
Determine the columns for your conditions (e.g., column B for an exact match, column D for a partial match, column G for another exact match) and your return column (e.g., column H).
Select the cell where you want the result. Type the formula: =XLOOKUP(1,($B$4:$B$20=$P$10)*(LEFT($D$4:$D$20,1)=$P$11)*($G$4:$G$20=R10),$H$4:$H$20)
Modify the cell references to match your specific data ranges. Ensure that your lookup ranges and return ranges all share the exact same starting and ending rows.
Press Enter to execute the formula. If needed, drag the fill handle down to apply it to subsequent rows.
Apply a Dynamic Array Formula Using BYROW and LAMBDA
Use BYROW and LAMBDA to automatically spill the XLOOKUP results down a column without needing to manually drag the formula.
Easily Manage Complex Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports advanced dynamic array formulas like XLOOKUP, BYROW, and LAMBDA. It is a powerful and free tool for data analysis that handles multiple criteria seamlessly.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
- 2. Open Your Data: Launch WPS Spreadsheet and open your existing Excel (.xlsx) file.
- 3. Apply XLOOKUP: Use the XLOOKUP formula with Boolean arrays just as you would in Excel. WPS Spreadsheet processes multiple criteria and partial matches flawlessly.

Frequently Asked Questions
Why does my XLOOKUP formula with multiple criteria return a #VALUE! error?
This usually happens when the lookup arrays or the return array do not have the exact same dimensions. Ensure all ranges (e.g., B4:B20 and D4:D20) have the exact same number of rows.
Can I use wildcard characters like * or ? instead of the LEFT function in XLOOKUP?
Yes, XLOOKUP supports wildcards for partial text matching. To use them, you must set the 'match_mode' argument to 2. However, when combining multiple criteria using Boolean logic (multiplying arrays), using text manipulation functions like LEFT or RIGHT is often more straightforward to structure.
What does the '1' mean in =XLOOKUP(1,...)?
When you multiply Boolean arrays (conditions), TRUE evaluates to 1 and FALSE to 0. A row only results in 1 if all conditions are met (1*1*1 = 1). Setting the lookup_value to 1 tells XLOOKUP to find the row where all criteria evaluate to TRUE.




