MATCH Function in Excel — With Examples (Exact, Approximate, INDEX MATCH)
Learn the MATCH function in Excel: exact and approximate matches, wildcards, INDEX MATCH lookups, two-way lookups and XMATCH.
Read Guide →You want the sales for East and Paid — not East, not Paid, but the row where both are true. A plain XLOOKUP stops at the first East row, which is the wrong answer when two columns decide. The fix is one formula: =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11) — and it returns 1200, the sales on the first row where both conditions are true. This guide runs that formula and the two other methods on the same ten-order table, so you can check every answer yourself — Boolean logic, concatenation, and the helper column — plus OR logic, three conditions, the last match, and what to do when nothing matches.
Quick takeaway: multiply the tests and look up 1.
=XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11) → 1200. Each test gives TRUE or FALSE per row; multiplying turns TRUE into 1 and FALSE into 0, so only the row where both are true is a 1.=XLOOKUP("East|Paid",B2:B11&"|"&E2:E11,C2:C11) → 1200. Join the columns into one key — easier to read, less flexible.=B2&"|"&E2, then a plain XLOOKUP on it — the easiest way to read the formula later.
Every example below uses the same ten orders. Every result was checked against them.
| Excel row | A Rep | B Region | C Sales | D Order Date | E Status | F Notes |
|---|---|---|---|---|---|---|
| 2 | Alex | East | 1200 | 9/3/2026 | Paid | Rush |
| 3 | Priya | West | 850 | 9/15/2026 | Pending | (blank) |
| 4 | Jordan | east | 2400 | 10/2/2026 | Paid | Gift wrap |
| 5 | Sam | North | 450 | 10/9/2026 | Paid | Call first |
| 6 | Alex | West | 1750 | 10/20/2026 | Pending | (blank) |
| 7 | Taylor | East | 600 | 10/22/2026 | Paid | Rush |
| 8 | Priya | East | 900 | 11/4/2026 | Pending | (blank) |
| 9 | Jordan | South | 1100 | 11/12/2026 | Paid | Delivery |
| 10 | Sam | West | 300 | 11/20/2026 | Pending | (blank) |
| 11 | Alex | North | 1500 | 12/1/2026 | Paid | Rush |
A plain XLOOKUP with one condition stops at the first match:
=XLOOKUP("East", B2:B11, C2:C11)
That returns 1200 — the first East row. That happens to be right for “East”, but it cannot answer “East and Paid”, because the first East row is Paid anyway. Try “West and Pending”: a plain XLOOKUP for “West” returns 850, the first West row, which is Pending — again right by luck. But “West and Paid” has no plain-XLOOKUP answer at all: the first West row is Pending, and XLOOKUP stops there. That is the problem this page solves.
This method needs no extra columns, and it works with as many conditions as you want. You check each condition against its own column, which gives you a list of TRUE and FALSE values. Then you multiply those lists and look for the row that comes out as 1.
=XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11)
Here is what happens row by row. The first test, B2:B11="East", gives TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE. The second test, E2:E11="Paid", gives TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE. Multiply them — Excel treats TRUE as 1 and FALSE as 0 — and the lookup array is:
| Excel row | Region = “East” | Status = “Paid” | Multiplied |
|---|---|---|---|
| 2 | 1 | 1 | 1 |
| 3 | 0 | 0 | 0 |
| 4 | 1 | 1 | 1 |
| 5 | 0 | 1 | 0 |
| 6 | 0 | 0 | 0 |
| 7 | 1 | 1 | 1 |
| 8 | 1 | 0 | 0 |
| 9 | 0 | 1 | 0 |
| 10 | 0 | 0 | 0 |
| 11 | 0 | 1 | 0 |
A row only ends up as 1 when both conditions are true. XLOOKUP looks for the 1 and returns the sales from that row — the first 1 is row 2, so the answer is 1200. Note row 4: the region is written “east” in lowercase, and it still counts — XLOOKUP text comparison is not case-sensitive.
| What you want | Formula | Result |
|---|---|---|
| East AND Paid | =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11) | 1200 |
| West AND Pending | =XLOOKUP(1,(B2:B11="West")*(E2:E11="Pending"),C2:C11) | 850 |
| West AND Sales > 1000 | =XLOOKUP(1,(B2:B11="West")*(C2:C11>1000),C2:C11) | 1750 |
| East AND Paid AND Sales > 1000 | =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid")*(C2:C11>1000),C2:C11) | 1200 |
| West AND Pending AND Sales > 1000 | =XLOOKUP(1,(B2:B11="West")*(E2:E11="Pending")*(C2:C11>1000),C2:C11) | 1750 |
Read the rows. West AND Pending is 850 — the first of three West-and-Pending rows (rows 3, 6 and 10). West AND Sales > 1000 is 1750 — only row 6 qualifies, so there is no ambiguity. And a condition doesn’t have to be an exact match: you can use >, <, >=, <=, or <> inside the brackets, and the structure of the formula stays the same.
Join the lookup values with &, and join the lookup columns the same way. XLOOKUP then searches the combined list without a helper column.
=XLOOKUP("East|Paid", B2:B11&"|"&E2:E11, C2:C11)
That returns 1200. The joined keys are “East|Paid”, “West|Pending”, “east|Paid”, “North|Paid”, “West|Pending”, “East|Paid”, “East|Pending”, “South|Paid”, “West|Pending”, “North|Paid” — and the first “East|Paid” is row 2. This method is easier to read for two conditions, but less flexible for complex rules: you cannot put a > inside a joined key, so the “Sales > 1000” lookups from Method 1 have no concatenation version.
Use a separator that cannot appear in the data — | is the usual choice. Without one, “East” + “Paid” is “EastPaid”, and so is “EastP” + “aid” — two different pairs giving the same key, and the wrong row coming back. And don’t use TEXTJOIN for the lookup array: TEXTJOIN("-", TRUE, B2:B11, E2:E11) returns one long string, not a list of row-by-row keys, so XLOOKUP can’t match individual rows.
Helper columns are one of the easiest and most efficient ways to implement multiple criteria. They simplify formulas and improve readability. Put this in G2 and fill down:
=B2&"|"&E2
Then a plain XLOOKUP on the helper column:
=XLOOKUP("East|Paid", G2:G11, C2:C11)
That returns 1200. The helper column costs one column of space and saves every future reader from decoding a Boolean array. If the workbook is shared with people who do not write formulas, use the helper column. If the workbook must stay clean and the reader is comfortable, use Boolean logic.
So far, every condition had to be true. If a row only needs to meet one of your conditions, you add the checks instead of multiplying them, and wrap the sum in >0:
=XLOOKUP(1,((B2:B11="East")+(B2:B11="South"))*(C2:C11>1000),C2:C11)
That returns 1200 — the first row that is East or South and has sales over 1000. Row 2 is East and 1200, so it wins; row 4 is East and 2400, and row 9 is South and 1100, and both would also qualify. The + gives 1 where either region test is true and 2 where both are true (impossible here, a row has one region), and >0 turns that back into TRUE/FALSE before the multiplication. If you forget the >0, a row where both tests are true gives 2, and XLOOKUP looking for 1 skips it — the classic OR-logic bug.
| What you want | Formula | Result |
|---|---|---|
| Last East AND Paid | =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11,,,-1) | 600 |
| Every East AND Paid | =FILTER(C2:C11,(B2:B11="East")*(E2:E11="Paid")) | 1200, 2400, 600 |
| Central AND Paid (no such row) | =XLOOKUP(1,(B2:B11="Central")*(E2:E11="Paid"),C2:C11,"Not found") | Not found |
Only the first match comes back from XLOOKUP. The last match needs search_mode −1 — the last East-and-Paid row is row 7, Taylor, 600. Every match needs FILTER, which spills all three: 1200, 2400 and 600. And no match gives #N/A unless you pass the fourth argument — “Not found” here — which is the if_not_found slot. There is no Central region in the table, so the formula has nothing to return.
Two of this page’s keywords ask about VLOOKUP with two conditions. VLOOKUP cannot do Boolean logic — it has no way to build a lookup array on the fly. It needs the helper column: join the key in column G, then =VLOOKUP("East|Paid", G2:H11, 2, FALSE) where H holds the sales. And the helper column must be the first column of the table array — VLOOKUP only looks right, never left.
The same applies to old Excel. XLOOKUP needs Excel 365 or Excel 2021, and it’s not available in Excel 2019 or earlier. On those versions, INDEX+MATCH does the Boolean job: =INDEX(C2:C11, MATCH(1,(B2:B11="East")*(E2:E11="Paid"),0)) returns 1200 — the same array, the same 1, with MATCH doing the finding and INDEX doing the returning. The full guide is on the MATCH function page.
| Mistake | What happens | Fix |
|---|---|---|
| You forgot the 1 in the lookup value | XLOOKUP looks for TRUE in an array of 0s and 1s and finds nothing | Look up 1: =XLOOKUP(1, ...) |
You used + for AND logic | Rows where only one condition is true come back as 1 | Multiply for AND: * |
You used * for OR logic without >0 | A row where both tests are true gives 2 and is skipped | Add, then wrap in >0 |
| You joined keys without a separator | “East”+”Paid” and “EastP”+”aid” give the same key | Use | between the parts |
| You expected every match | XLOOKUP returns only the first | Use search_mode −1 for the last, FILTER for all |
| You ran it on Excel 2019 | #NAME? — XLOOKUP does not exist there | Use INDEX+MATCH, or upgrade |
How do I use XLOOKUP with two criteria? =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11) — multiply the two tests and look up 1. On the table above it returns 1200.
What does multiplying TRUE and FALSE do? Excel treats TRUE as 1 and FALSE as 0, so a row is 1 only when every test is true. XLOOKUP then finds that 1.
Is there an easier way than Boolean logic? Yes — the helper column. Put =B2&"|"&E2 in a spare column and run a plain XLOOKUP on it. It is the easiest to read later.
How do I do an either-or lookup? Add the tests instead of multiplying them, and wrap the sum in >0: =XLOOKUP(1,((B2:B11="East")+(B2:B11="South"))*(C2:C11>1000),C2:C11) returns 1200.
How do I get the last match instead of the first? Add search_mode −1 as the sixth argument: =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11,,,-1) returns 600.
How do I use VLOOKUP with multiple criteria? You can’t do it with Boolean logic — VLOOKUP needs a helper column with the joined key, and the helper must be the first column of the table array.
Does this work in Excel 2019? No. XLOOKUP needs Excel 365 or Excel 2021. On older versions use INDEX+MATCH with the same Boolean array.
That is XLOOKUP with multiple criteria: =XLOOKUP(1,(B2:B11="East")*(E2:E11="Paid"),C2:C11) — multiply the tests and look up 1 — and on the ten-order table in this guide it answers every question: East and Paid is 1200, West and Pending is 850, West and over 1000 is 1750, and East or South and over 1000 is 1200 again. Remember the two things that catch everyone once: XLOOKUP only takes a single lookup value, so the conditions have to be combined into one array first — and it only returns the first match, so the last match needs search_mode −1 and every match needs FILTER. And remember the trade between the three methods: Boolean logic is the most flexible and needs no extra columns, concatenation is the easiest to read for two conditions, and the helper column is the easiest to read later when someone else opens the workbook. From here, the next functions worth learning are the ones this one sits next to — the XLOOKUP function itself, for the single-criterion cases and the if_not_found and search_mode arguments in full, and the MATCH function for the same Boolean array on old Excel — and the full learning order for the whole site is on the Excel Formulas hub and the Lookup & Filter topic page.
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 →Learn the INDIRECT function in Excel: turn text into a live cell reference, pull from a sheet named in a cell, and...
Read Guide →