XLOOKUP vs FILTER
Updated · Works in: Excel 2021+, Microsoft 365, Google Sheets · Every example checked before release
Short answer
Use XLOOKUP when you want one result per key, and FILTER when you want every row that matches. Both are in Excel 2021, Excel 2024, Microsoft 365 and Google Sheets. XLOOKUP stops at the first match (or the last, with search mode -1); FILTER spills all of them.
| XLOOKUP | FILTER | |
|---|---|---|
| Returns | One match (first or last) | Every matching row |
| Several conditions | Multiply them in the lookup array | Multiply them in include |
| Nothing found | Fourth argument, else #N/A | Third argument, else #CALC! (Excel) |
| Excel | Excel 2021, 2024, Microsoft 365 | Excel 2021, 2024, Microsoft 365 |
| Google Sheets | Yes | Yes (conditions as separate arguments) |
First match: XLOOKUP
Who is the North rep? XLOOKUP(I1, B2:B9, A2:A9) searches the Region column and returns the first rep it finds: Amara Osei. There's a second North rep further down, and XLOOKUP never mentions her.
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Jul | Aug | Sep | Target | Region | North | |
| 2 | Amara Osei | North | $12,400 | $13,100 | $11,800 | $36,000 | First rep | Amara Osei | |
| 3 | Ben Fischer | South | $9,800 | $10,250 | $12,100 | $30,000 | |||
| 4 | Lina Chen | East | $15,200 | $14,800 | $16,900 | $45,000 | |||
| 5 | Diego Alvarez | West | $8,700 | $9,100 | $8,400 | $28,000 | |||
| 6 | Eva Novak | North | $11,200 | $12,600 | $13,900 | $36,000 | |||
| 7 | Farid Haddad | South | $13,300 | $12,900 | $14,100 | $39,000 | |||
| 8 | Grace Kim | East | $10,100 | $9,600 | $10,800 | $33,000 | |||
| 9 | Hugo Martin | West | $14,500 | $15,800 | $15,100 | $42,000 |
Every match: FILTER
FILTER(A2:A9, B2:B9="North") returns both North reps, Amara Osei and Eva Novak, spilled into the cells below. Text in a condition goes in double quotes; point it at a cell instead (B2:B9=I1) and the list follows whatever region you type. Give FILTER a wider array to return whole rows.
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Jul | Aug | Sep | Target | Region | North | |
| 2 | Amara Osei | North | $12,400 | $13,100 | $11,800 | $36,000 | All reps | Amara Osei | |
| 3 | Ben Fischer | South | $9,800 | $10,250 | $12,100 | $30,000 | Eva Novak | ||
| 4 | Lina Chen | East | $15,200 | $14,800 | $16,900 | $45,000 | |||
| 5 | Diego Alvarez | West | $8,700 | $9,100 | $8,400 | $28,000 | |||
| 6 | Eva Novak | North | $11,200 | $12,600 | $13,900 | $36,000 | |||
| 7 | Farid Haddad | South | $13,300 | $12,900 | $14,100 | $39,000 | |||
| 8 | Grace Kim | East | $10,100 | $9,600 | $10,800 | $33,000 | |||
| 9 | Hugo Martin | West | $14,500 | $15,800 | $15,100 | $42,000 |
Choosing between them
If the key is unique (a SKU, an employee ID), XLOOKUP is the right tool and returns one value you can use in further maths. If the key repeats (a region, a status, a customer), decide whether you want one row or all of them: XLOOKUP silently picks one, which can hide data. FILTER needs empty cells to spill into, or it shows #SPILL!. The FILTER guide and VLOOKUP vs XLOOKUP go deeper.
Which should a beginner learn first?
XLOOKUP: looking up one value is the more common job, and it's the natural next step after VLOOKUP. Learn FILTER next, because “show me every row where…” comes up as soon as you build reports. Both work in Google Sheets, so the skills carry over.
Check yourself
One real exercise from the “Dynamic arrays” unit. Checked on our server; no account needed.List the reps who sold more than $13,000 in September, in H2.
- Use FILTER
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Jul | Aug | Sep | Target | Big September | |
| 2 | Amara Osei | North | $12,400 | $13,100 | $11,800 | $36,000 | ||
| 3 | Ben Fischer | South | $9,800 | $10,250 | $12,100 | $30,000 | ||
| 4 | Lina Chen | East | $15,200 | $14,800 | $16,900 | $45,000 | ||
| 5 | Diego Alvarez | West | $8,700 | $9,100 | $8,400 | $28,000 | ||
| 6 | Eva Novak | North | $11,200 | $12,600 | $13,900 | $36,000 | ||
| 7 | Farid Haddad | South | $13,300 | $12,900 | $14,100 | $39,000 | ||
| 8 | Grace Kim | East | $10,100 | $9,600 | $10,800 | $33,000 | ||
| 9 | Hugo Martin | West | $14,500 | $15,800 | $15,100 | $42,000 |
Common mistakes
Using XLOOKUP on a key that repeats and assuming the result is the only match.
Typing something into the cells FILTER needs to spill into (#SPILL!).
Using AND() or OR() inside FILTER instead of multiplying or adding the conditions.
Questions
Can XLOOKUP return several matches?+
No, one per lookup value. For every match, use FILTER.
What does FILTER show when nothing matches?+
In Excel, #CALC! unless you give the third argument; in Google Sheets, #N/A.
Reading is step one. Now make it stick.
Practise it in a five-minute lesson on a live sheet, with instant feedback. No account needed for the free units.
Sources
Official documentation the facts on this page were checked against.