XLOOKUP Multiple Criteria — With Examples (Boolean Logic, Concatenation, OR)
Learn XLOOKUP with multiple criteria in Excel: Boolean logic, concatenation, helper columns and OR logic, with worked examples.
Read Guide →VLOOKUP has been the standard lookup in Excel for over twenty years, and XLOOKUP is the newer function Microsoft built to replace it. If you have heard that XLOOKUP is better, you have heard right — in almost every way. But “better” does not mean “switch everything today”: XLOOKUP does not exist in Excel 2019 or earlier, so a file full of XLOOKUPs breaks for anyone on old Excel, and a VLOOKUP that already works does not need rewriting. This guide runs both functions side by side on the same small table, shows you the seven differences that matter, proves the one dangerous VLOOKUP habit with a real wrong answer, and ends with a clear verdict for your situation.
Quick takeaway: XLOOKUP is the safer choice for new work — with one exception.

VLOOKUP:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
XLOOKUP:
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
The design difference is the whole story. VLOOKUP takes one block of data plus a column number you count by hand. XLOOKUP takes two separate ranges: the column to search, and the column to return. Almost every advantage XLOOKUP has comes from that design.
The worked examples below use one small product table, so you can check every result by hand.
| SKU (A) | Product (B) | Category (C) | Price (D) | Stock (E) |
|---|---|---|---|---|
| 101 | Laptop Stand | Accessories | 45 | 120 |
| 102 | Standing Desk | Furniture | 399 | 12 |
| 103 | Office Chair | Furniture | 249 | 30 |
| 104 | Monitor Arm | Accessories | 89 | 75 |
The table sits in A1:E5 (headers in row 1, data in rows 2 to 5).
Both functions return the same answer here. The difference is how much you have to tell Excel.
VLOOKUP:
=VLOOKUP(102, A2:E5, 4, FALSE)
Find 102 in the first column of A2:E5, then count 4 columns across (A=1, B=2, C=3, D=4) and return the price: 399. The FALSE at the end forces an exact match — leave it out and you get the dangerous default, shown below.
XLOOKUP:
=XLOOKUP(102, A2:A5, D2:D5)
Search A2:A5 for 102, return the matching item from D2:D5: 399. No counting, and exact match is already the default. Same answer, and XLOOKUP says what it is doing instead of making you count columns.
This is the most important difference, and the most dangerous one.
Rule: if you keep using VLOOKUP, always write FALSE as the fourth argument. =VLOOKUP(102, A2:E5, 4, FALSE) — never =VLOOKUP(102, A2:E5, 4). With XLOOKUP you do not need to remember this, because exact is the default.
VLOOKUP searches the first column of the table and can only return columns to its right. XLOOKUP searches one range and returns from any other range, left or right.
Example: find the product name for the price 399. The price is in column D, the product name is in column B — to the left of the price.
XLOOKUP:
=XLOOKUP(399, D2:D5, B2:B5)
Result: “Standing Desk”. Check it: 399 is the price of the Standing Desk (SKU 102).
VLOOKUP: cannot do this at all. The lookup column must be first, and the return column must be to its right. On any Excel version, the workaround is INDEX/MATCH — on old Excel, that is what you use for a left lookup.
In VLOOKUP the column number is a typed constant. Insert a column inside the table and the range stretches to include it, but the number stays the same — so the formula quietly returns a different column.
Example: insert a new column between Category (C) and Price (D). The price moves from column 4 to column 5, but =VLOOKUP(102, A2:F5, 4, FALSE) still says 4 — and now returns the new blank column instead of the price. No error, wrong answer.
In XLOOKUP the return range is an ordinary reference, so Excel moves it with the data: =XLOOKUP(102, A2:A5, E2:E5) still returns 399 after the insert. Nothing to count, nothing to break.
VLOOKUP shows #N/A when the value is missing. To show your own text instead, you wrap it in another function:
=IFNA(VLOOKUP(999, A2:E5, 4, FALSE), "Not found")
Result: “Not found”. (Use IFNA rather than IFERROR — IFNA only catches #N/A, while IFERROR hides every error, including real mistakes in your formula.)
XLOOKUP has the same idea built into its syntax — the fourth argument:
=XLOOKUP(999, A2:A5, D2:D5, "Not found")
Result: “Not found”. No wrapper needed. It takes any text, number or formula you want.
VLOOKUP returns one value at a time. To get four columns you need four formulas.
XLOOKUP returns several columns in one formula — the result spills across the cells:
=XLOOKUP(102, A2:A5, B2:E5)
Result, spilling across four cells: Standing Desk, Furniture, 399, 12. One formula, the whole row. This is the same spill behaviour as the FILTER function guide.
VLOOKUP looks from the top and returns the first match only. XLOOKUP does the same by default — but its search_mode argument can scan from the bottom up with −1, returning the last match.
Example: an order log where the same customer appears several times. Ali’s orders: 100, then 150, then 175. To find Ali’s last order:
=XLOOKUP("Ali", A2:A6, B2:B6, , , -1)
Result: 175 — the last Ali in the list, not the first (100). VLOOKUP cannot do this at all.
Sometimes you do want an approximate match — the next smaller or next larger value. XLOOKUP’s match_mode handles it: −1 for next smaller, 1 for next larger, and it works on unsorted data.
VLOOKUP’s approximate match only works when the first column is sorted in ascending order. On unsorted data it returns wrong results without warning — the same danger as Difference 1. So if you need an approximate match, XLOOKUP is not just easier, it is safer.
| Compared on | VLOOKUP | XLOOKUP |
|---|---|---|
| Availability | Every version of Excel | Microsoft 365, Excel 2021, 2024, Excel for the web |
| Lookup direction | Return column must sit to the right | Any direction, left or right |
| Default match | Approximate (dangerous) | Exact (safe) |
| Missing values | #N/A unless wrapped in IFNA | Built-in if_not_found argument |
| Column inserts | Breaks — the typed number does not move | Safe — the return reference moves with the data |
| Return several columns | One value per formula | One formula spills the whole row |
| Search order | First match from the top only | First to last, or last to first with search_mode −1 |
| Approximate match | Needs a sorted first column | Works on unsorted data |
| How you say where to look | One table + a column number | Two separate ranges |
| Your situation | Use | Why |
|---|---|---|
| Microsoft 365, Excel 2021/2024, or Excel for the web, and the file stays with people on those versions | XLOOKUP | Safer defaults, fewer ways to break |
| Google Sheets only | XLOOKUP | Sheets supports it, same argument order as Excel |
| The file goes to clients or coworkers on Excel 2019 or older | VLOOKUP or INDEX/MATCH | XLOOKUP shows #NAME? there |
| The value you need is to the left of the key, on old Excel | INDEX/MATCH | VLOOKUP can only look to the right |
| An existing workbook full of VLOOKUPs that work correctly | Leave them | No benefit to rewriting formulas that already work |
| A course or an interview expects VLOOKUP | VLOOKUP | It is still the standard in teaching and hiring |
For everything new, use XLOOKUP. For everything that already works, leave it alone.
| Mistake | What happens | Fix |
|---|---|---|
| You left out FALSE in VLOOKUP | Approximate match on unsorted data — a wrong value, no error | Always write FALSE: =VLOOKUP(102, A2:E5, 4, FALSE) |
| You counted the column number wrong | The formula returns the wrong column, silently | Count again — or use XLOOKUP and stop counting |
| You inserted a column inside a VLOOKUP table | The number still points at the old column — wrong answer, no error | Update the number, or use XLOOKUP |
| You used XLOOKUP in a file for Excel 2019 users | #NAME? on their screen — the function does not exist there | Use VLOOKUP or INDEX/MATCH for shared files |
| You wrapped VLOOKUP in IFERROR to hide #N/A | It hides real mistakes too | Use IFNA, or XLOOKUP’s if_not_found |
| You tried to look left with VLOOKUP | It cannot — it only returns to the right | Use XLOOKUP, or INDEX/MATCH on old Excel |
| You rewrote a working workbook in XLOOKUP | Hours of work, new risk, no benefit | Leave working VLOOKUPs alone |
What is the difference between XLOOKUP and VLOOKUP? XLOOKUP searches one range and returns from another, defaults to an exact match, can look left, survives column inserts, and has a built-in not-found message. VLOOKUP searches the first column of a table, returns by a counted column number, defaults to an approximate match, and only looks right. The one thing VLOOKUP wins on is availability — it works in every Excel version.
Which is better, XLOOKUP or VLOOKUP? XLOOKUP, for new work, when everyone opening the file has Microsoft 365, Excel 2021 or later. VLOOKUP is better only when the file must work in Excel 2019 or older, or when a course or interview expects it.
Can XLOOKUP look to the left? Yes. =XLOOKUP(399, D2:D5, B2:B5) searches the price column and returns the product name from the column to its left. VLOOKUP cannot do this.
Does XLOOKUP work in Excel 2019? No. XLOOKUP needs Microsoft 365, Excel 2021, Excel 2024 or Excel for the web. In 2019 or earlier it shows #NAME?. Use VLOOKUP or INDEX/MATCH there.
Why does my VLOOKUP return the wrong value? Most often because you left out FALSE, so VLOOKUP did an approximate match on unsorted data. Always write FALSE as the fourth argument.
How do I show “Not found” instead of #N/A? With XLOOKUP: =XLOOKUP(999, A2:A5, D2:D5, "Not found"). With VLOOKUP: =IFNA(VLOOKUP(999, A2:E5, 4, FALSE), "Not found").
Should I replace all my VLOOKUPs with XLOOKUP? No. If they work correctly, leave them. Use XLOOKUP for new formulas, and switch old ones only when you are already changing that workbook.
That is the whole comparison: same answer on the same table, but XLOOKUP gets there with fewer ways to break — no counting, no dangerous default, no fear of an inserted column, and a built-in answer for when nothing is found. The one real limit is version: if the file has to open in Excel 2019 or earlier, VLOOKUP is still the right call, and a working VLOOKUP does not need replacing just because something newer exists. Use XLOOKUP for everything new, keep VLOOKUP where it already works, and when you need to pull out every matching row instead of one value, the next guide to read is the FILTER function guide — FILTER pulls out every match, while a lookup pulls out one.
Learn XLOOKUP with multiple criteria in Excel: Boolean logic, concatenation, helper columns and OR logic, with worked examples.
Read Guide →Learn the MATCH function in Excel: exact and approximate matches, wildcards, INDEX MATCH lookups, two-way lookups and XMATCH.
Read Guide →Learn the UNIQUE function in Excel: distinct values from a column, exactly once, sorted, blank-free, counted and combined.
Read Guide →