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 stands for Vertical Lookup, and it is the function most Excel users learn first. You give it a value to find — a product code, a name, an ID — and it searches down the first column of a table and returns the value from the same row, in the column you choose. It works in every version of Excel, from 2007 to today, which is why it is still the lookup you meet in other people’s files. It also has one dangerous habit: if you leave out its fourth argument, it guesses — and its guess is wrong on unsorted data, with no error to warn you. This guide teaches it in eight examples, all on the same table, with every answer checked by hand — and it starts with the one rule that stops the wrong answers.
Quick takeaway: always write FALSE. That one word is the whole secret.
=VLOOKUP(102, A2:E5, 4, FALSE) — find 102 in the first column of A2:E5, return the 4th column. Answer: 399.
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
| Argument | Required? | What it does |
|---|---|---|
| lookup_value | Yes | The value to search for — a number, text, or a cell reference |
| table_array | Yes | The range to search. VLOOKUP always searches the FIRST column of this range |
| col_index_num | Yes | Which column of the range to return a value from. The first column of the range is 1, the next is 2, and so on |
| range_lookup | No | FALSE = exact match. TRUE, or leaving it out = approximate match. In most cases you want FALSE |
Column numbers count from the start of your range, not from column A. If your table starts in column C, then column C is 1. That is the mistake that makes beginners return the wrong column.
The same four-row product table from the XLOOKUP vs VLOOKUP guide — so every answer here matches that guide exactly.
| A | B | C | D | E |
|---|---|---|---|---|
| SKU | Product | Category | Price | Stock |
| 101 | Laptop Stand | Accessories | 45 | 120 |
| 102 | Standing Desk | Furniture | 399 | 12 |
| 103 | Office Chair | Furniture | 249 | 30 |
| 104 | Monitor Arm | Accessories | 89 | 75 |
=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 in Example 5.
Typing the code into the formula works, but it means editing the formula every time you want a different product. Put the code in a cell instead:
=VLOOKUP(G2, $A$2:$E$5, 4, FALSE)
With 102 in G2, the result is 399. Type 103 into G2 and the price updates to 249 automatically. The dollar signs in $A$2:$E$5 lock the table range — see the absolute reference guide — so the range does not move when you copy the formula down. That is the fix for the “I copied it down and the answers went wrong” problem.
Change the column number to get a different answer from the same row:
=VLOOKUP(103, A2:E5, 5, FALSE)
Result: 30 — the stock of the Office Chair, from column 5. Same lookup, same row, different column. That is all col_index_num does.
The table does not have to be on the same sheet. Put the product table on a sheet called Products, and look it up from anywhere:
=VLOOKUP(102, Products!A2:E5, 4, FALSE)
Result: 399. The sheet name goes before the range, with an exclamation mark. If the sheet name has a space in it, wrap it in single quotes: 'Product List'!A2:E5. The same pattern works for another workbook — Excel writes the workbook name in square brackets for you when you click across — but keep the workbook open, or the formula shows the full file path and breaks when the file moves.
This is the example the other guides skip, and it is the most important one on this page. Sometimes you do want an approximate match — the next smaller value. It only works when the first column is sorted in ascending order.
Discount tiers, sorted:
| Threshold | Discount |
|---|---|
| 0 | 0% |
| 100 | 5% |
| 500 | 10% |
| 1,000 | 15% |
An order of 750 falls in the 500–999 band, so the discount is 10%:
=VLOOKUP(750, A2:B5, 2, TRUE)
Result: 10%. TRUE means “approximate”: 750 is not in the list, so VLOOKUP takes 500, the largest value below it, and returns 10%.
Now the danger. Search for a code that is not in the product table, with TRUE:
=VLOOKUP(105, A2:E5, 4, TRUE)
Result: 89 — the price of the Monitor Arm (SKU 104). There is no SKU 105, but VLOOKUP does not tell you that. It takes 104, the largest value below 105, and returns its price as if it were the answer. No error, wrong answer. That is why the rule is “always write FALSE” — with FALSE, the same lookup returns #N/A, which is honest: the value is not there.
You remember part of a product name, not the whole thing. Use * for “anything” — but only with FALSE:
=VLOOKUP("*Stand*", A2:E5, 2, FALSE)
Result: “Laptop Stand” — the first product whose name contains “Stand” is the Laptop Stand (SKU 101), and column 2 is the product name. The * on both sides means “anything before and after”. Without FALSE, the wildcard does not work — approximate match ignores it.
=IFNA(VLOOKUP(999, A2:E5, 4, FALSE), "Not found")
SKU 999 is not in the table. VLOOKUP on its own returns #N/A. Wrapped in IFNA, it returns “Not found” — a message your reader understands, instead of an error code. XLOOKUP has this built in as its fourth argument; VLOOKUP needs the wrapper. IFNA is available in Excel 2013 and later.
VLOOKUP cannot look to the left. If the price sits to the left of the code, VLOOKUP simply cannot do the job — the lookup value must be in the first column of the range. There is a workaround, and it is worth knowing, because you will meet this table in other people’s files:
=VLOOKUP(399, CHOOSE({1,2}, D2:D5, B2:B5), 2, FALSE)
CHOOSE builds a temporary two-column table — prices first, products second — and VLOOKUP searches it. Result: “Standing Desk”. It works, but it is a trick, not a clean formula. If you find yourself writing this often, that is the sign to use XLOOKUP instead — it looks left or right without a workaround.
| Situation | Use |
|---|---|
| The file must open in Excel 2019 or earlier | VLOOKUP — XLOOKUP does not exist there |
| A quick check in a simple sheet you control | VLOOKUP — with FALSE, every time |
| You need the value to the left of the key | XLOOKUP or INDEX+MATCH — VLOOKUP cannot |
| The table will change — columns inserted, layout moved | XLOOKUP or INDEX+MATCH — VLOOKUP’s column number breaks |
| You need the last match, not the first | XLOOKUP with search_mode −1 — VLOOKUP only returns the first |
| You need every matching row, not one | FILTER — see the FILTER function guide |
| An interview or a test | VLOOKUP — it is still the function interviewers ask about |
Yes. Google Sheets has VLOOKUP, with the same syntax:
=VLOOKUP(102, A2:E5, 4, FALSE)
It works the same way, including the FALSE rule and the approximate-match danger. The one difference: Sheets also has no XLOOKUP, so VLOOKUP and INDEX+MATCH are the lookup functions there. This is an Excel site, so the Sheets versions are not taught here; the point is that the same formula works in both apps.
| Mistake | What happens | Fix |
|---|---|---|
| You left out FALSE | Approximate match on unsorted data — a wrong value, no error | Always write FALSE: =VLOOKUP(102, A2:E5, 4, FALSE) |
| You counted the column from A, not from the range | You return the wrong column | Count from the first column of YOUR range — it is 1 |
| You copied the formula down without locking the range | The table range moves and the answers go wrong | Lock it: $A$2:$E$5 — see the absolute reference guide |
| The lookup value is a number, the column is text | #N/A — 102 and “102” are different values | Make both the same type; check for text with ISTEXT |
| Extra spaces in the lookup column | #N/A — “102 ” with a trailing space is not 102 | Clean the column with TRIM first |
| The range does not cover the row | #N/A — the value is below your range | Extend the range, or use a whole column |
| You tried to look left | #N/A or a wrong value — VLOOKUP cannot look left | Use XLOOKUP, INDEX+MATCH, or the CHOOSE workaround above |
| You inserted a column in the table | The column number now points at the wrong column — no error | Use XLOOKUP or INDEX+MATCH, or fix the number by hand |
What is a VLOOKUP? VLOOKUP stands for Vertical Lookup. It searches for a value in the first column of a table and returns a value from the same row, in the column you choose. Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]).
How do I use VLOOKUP in Excel? Type =VLOOKUP(, then the value to find, the range to search, the column number to return, and FALSE for an exact match. For example: =VLOOKUP(102, A2:E5, 4, FALSE) returns 399.
What does FALSE mean in VLOOKUP? Exact match. Without FALSE, VLOOKUP does an approximate match — it returns the largest value below yours, which is wrong on unsorted data and gives no error. Always write FALSE unless you deliberately want a tier or band lookup on a sorted column.
Why does my VLOOKUP return the wrong value? The most common cause is the missing FALSE — approximate match on unsorted data. The next most common is counting the column from A instead of from the start of your range, or copying the formula down without locking the range with dollar signs.
Why does my VLOOKUP show #N/A when the value is right there? Usually an extra space, or a number stored as text. Check for trailing spaces with TRIM, and check that the lookup value and the lookup column are the same type — both numbers or both text.
Can VLOOKUP look to the left? Not on its own. The lookup value must be in the first column of the range. Use the CHOOSE workaround above, or XLOOKUP, or INDEX+MATCH.
Does VLOOKUP work in Google Sheets? Yes — the same formula, the same syntax, including the FALSE rule.
Is VLOOKUP obsolete? No. It works in every version of Excel and is still the function interviewers ask about. For files that will be maintained, XLOOKUP or INDEX+MATCH is safer, because VLOOKUP’s column number breaks when the layout changes.
That is VLOOKUP: four arguments, one rule that matters — always write FALSE — and eight examples on one table to prove each one works. It is the lookup you will meet in other people’s files, the one that works in every version of Excel, and the one interviewers still ask about. Learn it properly, with the FALSE rule and the locked range, and it will serve you for years. And when you find yourself writing the CHOOSE workaround for a left lookup, or fixing a column number after an insert, that is the sign to move on — the XLOOKUP function is waiting, and the Excel lookup functions topic page compares all four side by side. The full learning order for the whole site is on the Excel Formulas hub.
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 →