INDEX MATCH with Multiple Criteria in Excel (With Examples) – LicenceHouse guide

To use INDEX MATCH with multiple criteria in Excel, multiply one test per criterion inside MATCH and look for 1: =INDEX(D2:D7, MATCH(1, (A2:A7=G2)*(B2:B7=G3), 0)). Each test returns TRUE or FALSE, the multiplication keeps only rows where every test is TRUE, and INDEX returns the value from that row.

Method Formula pattern Works in
INDEX MATCH array =INDEX(return, MATCH(1, (rng1=c1)*(rng2=c2), 0)) All versions (Ctrl+Shift+Enter in 2019 and earlier)
INDEX MATCH, no Ctrl+Shift+Enter =INDEX(return, MATCH(1, INDEX((rng1=c1)*(rng2=c2),0,1), 0)) All versions
Helper column =INDEX(return, MATCH(c1&"|"&c2, helper, 0)) All versions
XLOOKUP =XLOOKUP(1, (rng1=c1)*(rng2=c2), return) Excel 2021, 2024, Microsoft 365
FILTER (all matches) =FILTER(return, (rng1=c1)*(rng2=c2)) Excel 2021, 2024, Microsoft 365

How does the INDEX MATCH formula work?

INDEX returns the value at a given position in a range, and MATCH finds that position. Together they look up a value in one column and return the matching value from another. The basic formula is:

=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))

The final 0 in MATCH means exact match. Leave it out and MATCH defaults to 1, an approximate match that expects sorted data and often returns the wrong row. Microsoft's reference pages for INDEX and MATCH list every argument.

Unlike VLOOKUP, INDEX MATCH can return a column to the left of the lookup column, and it does not break when you insert columns. If you are coming from VLOOKUP, our guide to what VLOOKUP is and its common errors explains the differences.

How do I use INDEX MATCH with two criteria?

Turn each criterion into a TRUE/FALSE test, multiply the tests together, and MATCH the number 1. Here is the sample data:

How INDEX MATCH with two criteria works: Product and Region tests multiply to {0,1,0,0,0,1}, MATCH finds position 2, INDEX returns 950.

Row A (Product) B (Region) C (Month) D (Sales)
2 Laptop North Jan 1200
3 Laptop South Jan 950
4 Tablet North Jan 640
5 Laptop North Feb 1310
6 Tablet South Feb 720
7 Laptop South Feb 1010

With Laptop in G2 and South in G3, enter this in G5:

=INDEX(D2:D7, MATCH(1, (A2:A7=G2)*(B2:B7=G3), 0))

Step by step:

  1. (A2:A7=G2) returns {TRUE, TRUE, FALSE, TRUE, FALSE, TRUE}.
  2. (B2:B7=G3) returns {FALSE, TRUE, FALSE, FALSE, TRUE, TRUE}.
  3. Multiplying turns TRUE into 1 and FALSE into 0: {0, 1, 0, 0, 0, 1}.
  4. MATCH finds the first 1 at position 2.
  5. INDEX returns the second value in D2:D7, which is 950.

In Excel 2021, 2024 and Microsoft 365, press Enter as normal. In Excel 2019 and earlier, press Ctrl+Shift+Enter so Excel treats it as an array formula; curly brackets appear round it. If you forget, you get #N/A or a wrong answer.

To avoid Ctrl+Shift+Enter in older versions, wrap the tests in a second INDEX, which forces Excel to evaluate the array:

=INDEX(D2:D7, MATCH(1, INDEX((A2:A7=G2)*(B2:B7=G3),0,1), 0))

The criteria cells work well as drop-down lists, so users can only pick values that exist in the data.

How do I use INDEX MATCH with three or more criteria?

Add one more bracketed test for each extra condition. To find Laptop sales in the South in February, put Feb in G4 and use:

=INDEX(D2:D7, MATCH(1, (A2:A7=G2)*(B2:B7=G3)*(C2:C7=G4), 0))

Only row 7 passes all three tests, so the result is 1010. You can mix in other comparisons too, for example (D2:D7>1000) to require sales above 1,000.

For OR logic, where any one condition is enough, add the tests instead of multiplying them and check for a result greater than zero:

=INDEX(D2:D7, MATCH(TRUE, ((B2:B7="North")+(C2:C7="Feb"))>0, 0))

What we commonly see: the formula returns #N/A even though the match is clearly there. Nine times out of ten, one side has a trailing space or a number stored as text. Test with =LEN(A3) to spot extra spaces, and use TRIM in the comparison, as in (TRIM(A2:A7)=G2), if you cannot clean the source data.

Is there a simpler way with a helper column?

Yes. Join the criteria into one key in a helper column and do a normal single-criterion match. It is easier to read and fast on large sheets.

Excel helper column formula =INDEX(D2:D7, MATCH(G2&"|"&G3, E2:E7, 0)) explained, joining two criteria into one lookup key.

  1. In E2, enter =A2&"|"&B2 and fill down. E3 becomes Laptop|South.
  2. Look up the joined criteria: =INDEX(D2:D7, MATCH(G2&"|"&G3, E2:E7, 0)).

The separator matters. Without it, "AB" + "C" and "A" + "BC" both become "ABC" and can match the wrong row.

XLOOKUP vs INDEX MATCH: which should I use?

Use XLOOKUP if everyone who opens the file has Excel 2021, Excel 2024 or Microsoft 365. Use INDEX MATCH if anyone is still on Excel 2019 or 2016, because XLOOKUP does not exist there and returns #NAME?. The multiple-criteria version of XLOOKUP uses the same trick:

Comparison table of INDEX MATCH vs XLOOKUP: version support, default match type, not-found text, reverse search and returning columns.

=XLOOKUP(1, (A2:A7=G2)*(B2:B7=G3), D2:D7, "Not found")
INDEX MATCH XLOOKUP
Versions Every version Excel 2021, 2024, Microsoft 365
Default match Approximate unless you add 0 Exact
Built-in "not found" text No (wrap in IFERROR) Yes, fourth argument
Search last to first Awkward Yes, search_mode -1
Return several columns One per formula Yes, spills them

Microsoft's XLOOKUP function reference lists its six arguments. If your team is choosing a version for shared models, Office 2024 Professional Plus for Windows includes XLOOKUP and dynamic arrays as a one-time purchase, and our Excel 2024 vs Excel 365 comparison covers the functions that remain subscription-only.

To return every matching row rather than just the first, use FILTER in Excel 2021 or later: =FILTER(D2:D7, (A2:A7=G2)*(B2:B7=G3)) returns 950 and 1010. Leave empty cells below it, or you will see a #SPILL! error.

How do I use INDEX MATCH MATCH and IF MATCH?

INDEX MATCH MATCH is a two-way lookup: one MATCH finds the row and another finds the column. For a grid with products in A2:A5, months in B1:E1 and figures in B2:E5:

=INDEX(B2:E5, MATCH(H2, A2:A5, 0), MATCH(H3, B1:E1, 0))

"IF MATCH" usually means checking whether a value exists. MATCH returns #N/A when there is no match, so wrap it in ISNUMBER and an IF statement:

=IF(ISNUMBER(MATCH(G2, A2:A7, 0)), "Found", "Missing")

Advanced nuance: MATCH returns the first match only. If your criteria are not unique, you get the top row silently. Check how many rows qualify with =COUNTIFS(A2:A7,G2,B2:B7,G3). If the answer is more than 1 and you need a total, SUMIFS is the right tool rather than a lookup. Also note MATCH is not case-sensitive; "laptop" and "Laptop" match.

Frequently asked questions

Why does my INDEX MATCH multiple criteria formula return #N/A?

Either no row meets every condition, or one value differs slightly, for example a trailing space, a number stored as text, or a date with a hidden time. In Excel 2019 and earlier, forgetting Ctrl+Shift+Enter also causes #N/A. Use the INDEX-wrapped version, check each test separately, and wrap the formula in IFERROR to show a friendly message.

Do I need Ctrl+Shift+Enter for INDEX MATCH?

Only for the multiplied-criteria version in Excel 2019, 2016 and earlier. Excel 2021, 2024 and Microsoft 365 evaluate arrays automatically, so Enter is enough. A single-criterion INDEX MATCH never needs Ctrl+Shift+Enter. The version with a second INDEX around the tests also works with plain Enter in every version.

Is INDEX MATCH faster than XLOOKUP?

For most workbooks the difference is too small to notice. Multiplied-criteria formulas of either type test every row, so on very large ranges a helper column with a single-criterion lookup is usually quickest. Keep ranges tight, such as A2:A5000, instead of whole columns, and avoid volatile functions inside the lookup.

Can INDEX MATCH look up to the left?

Yes. INDEX and MATCH use separate ranges, so the return column can sit anywhere, including to the left of the lookup column. This is one of its main advantages over VLOOKUP, which only returns columns to the right of the first column in its table.

Can I use wildcards with multiple criteria?

Not with the multiplied tests, because the equals sign compares exact text. Use a wildcard-friendly function for that criterion instead, such as ISNUMBER(SEARCH("lap",A2:A7)) in place of (A2:A7=G2). SEARCH finds text anywhere in the cell and is not case-sensitive; use FIND for a case-sensitive version.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: INDEX function External Official INDEX syntax and array behaviour
Microsoft Support: MATCH function External match_type values and wildcard rules
Microsoft Support: XLOOKUP function External XLOOKUP arguments and defaults
What is VLOOKUP in Excel? Internal How VLOOKUP compares with INDEX MATCH
Drop-down lists in Excel Internal Controlled inputs for lookup criteria
Office 2024 Professional Plus for Windows Internal A version that includes XLOOKUP and FILTER
Excel 2024 vs Excel 365 Internal Functions that are subscription-only
#SPILL! error in Excel Internal Fixing FILTER results that cannot spill
IF then statement in Excel Internal Building the IF MATCH existence check
Data analysis, Excel, Excel formulas, How-to