
Complete Guide to XLOOKUP with Multiple Criteria — Boolean Multiplication, Text Concatenation, Approximate Match, and OR
XLOOKUP with multiple criteria is most reliable when you create a criteria array with Boolean logic and then look for 1. The key formula from the Exceljet example is =XLOOKUP(1,(criteria1)*(criteria2)*(criteria3),return_range). When you need an approximate match, pre-filter the data with IF.
Quick Fix
=XLOOKUP(1,(상품=H5)*(색상=H6)*(사이즈=H7), 가격)
Method 1: Boolean Multiplication (AND)
=XLOOKUP(1,(data[Item]=H5)*(data[Color]=H6)*(data[Size]=H7), data[Price])
Method 2: Text Concatenation
=XLOOKUP(H5&"|"&H6&"|"&H7, data[Item]&"|"&data[Color]&"|"&data[Size], data[Price])
Be aware of delimiter conflicts and performance.
Method 3: OR / Wildcards
=XLOOKUP(1,(data[Color]="Red")+(data[Color]="Pink"), data[Price])
=XLOOKUP("Hoodie*", data[Item], data[Price], "Not found", 2)
Method 4: Approximate Match + Multiple Criteria
=XLOOKUP(H7, IF(data[Service]=H6, data[Weight]), data[Cost], , -1)
6 Practical Examples
- Exact match with 3 criteria (AND)
- OR criteria (either one)
- Partial match + another criterion
- Approximate match (requires sorting)
- Text concatenation alternative
- First/last match (using search_mode)
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| #N/A | No match, spaces, or formatting | Clean the data (TRIM/CLEAN), IFNA |
| Slow performance | Overuse of text concatenation | Use Boolean multiplication and table references |
| Incorrect approximate match | Sorting requirement not met | Sort the data and check match_mode |
| Multiple matches | Duplicate data | Use FILTER or specify search mode |
Related Posts
- XLOOKUP vs. VLOOKUP Comparison
- Practical VLOOKUP with Multiple Criteria
- SUMIFS Beginner’s Guide
- Fix All Excel Errors
- Mastering TEXTSPLIT
Sources: Exceljet (Boolean logic and approximate multiple criteria), official Microsoft XLOOKUP documentation, and Ablebits (Boolean multiplication vs. concatenation comparison).
Pingback: XLOOKUP Wrong Record? Find and Fix Duplicate Lookup Keys