How to look up a value with two criteria (multi-condition lookup)
✓ Verified in LibreOffice 25.8.7.3Return a value that matches on two columns at once, e.g. the amount for Region = North AND Quarter = Q2.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =XLOOKUP("North|Q2",A2:A6&"|"&B2:B6,C2:C6) | Excel 365; concatenate the keys. |
| Google Sheets | =XLOOKUP("North|Q2",A2:A6&"|"&B2:B6,C2:C6) | Native XLOOKUP. |
| LibreOffice Calc | =XLOOKUP("North|Q2",A2:A6&"|"&B2:B6,C2:C6) | LibreOffice 25.8 (XLOOKUP added 24.8). |
How it works
Concatenate the two key columns (A&"|"&B) into a single combined key, then XLOOKUP that combined key. 'North|Q2' matches row 3, returning 250. The pipe separator avoids accidental collisions between key parts.
Verified, not just documented
We ran =XLOOKUP("North|Q2",A2:A6&"|"&B2:B6,C2:C6) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 250 — exactly the expected result. Every formula here is confirmed by actually executing it.