Direct Answer: Match Two Criteria With & in XLOOKUP
Standard XLOOKUP searches one column, so to match two criteria at once (for example, A2 = Item and B2 = Size), join the lookup cells and the two lookup columns using &:
=XLOOKUP(A2 & "|" & B2, $D$2:$D$100 & "|" & $E$2:$E$100, $F$2:$F$100, "Not Found")
Worked Example: Pricing by Item + Size Together
Suppose the same item appears in multiple sizes (Small, Medium, Large). Matching both Item and Size ensures you pull the exact price for that combination:
| A2 (Item) | B2 (Size) | D:E (Item | Size) | Col F (Price) | XLOOKUP Output |
|---|---|---|---|---|
| Running Tee | Large | Running Tee | Medium | $24 | $28 (matches Large row) |
| Running Tee | Large | Running Tee | Large | $28 | $28 |
| Running Tee | XL | Running Tee | Large | $28 | Not Found |
Key Tips for Multi-Criteria XLOOKUP
- Use a delimiter like
"|"when joining fields: Joining"AB"+"C"and"A"+"BC"without a separator could both produce"ABC"; adding"|"keeps boundaries distinct. - Keep all ranges the same length: Ensure
$D$2:$D$100,$E$2:$E$100, and$F$2:$F$100cover the exact same rows. - Need legacy Excel compatibility? If sharing with older Excel versions where multi-criteria dynamic lookup behaves differently, review INDEX-MATCH or VLOOKUP vs. XLOOKUP.
Try More Lookups: Test standard lookups and two-way matrix lookups in the Formula Finder.