Formula example
INDEX MATCH with Multiple Criteria
Direct answer: use INDEX with MATCH(1, (criteria1)*(criteria2), 0) when Excel needs to return one value by two or more columns. In the sample data, the formula returns the price where SKU matches H2 and Region matches H3.
Copy-paste formula
=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0)) With the sample data, SKU A-100 in the East region returns 49.
Useful variations
=INDEX(D2:D100, MATCH(H2&"|"&H3, A2:A100&"|"&B2:B100, 0)) Joins the key columns into one text key. Keep the "|" separator so 1 and 23 cannot be confused with 12 and 3.
=INDEX(D2:D100, MATCH(H2&"|"&H3, E2:E100, 0)) Use this when E2:E100 contains a helper key such as =A2&"|"&B2. It is easier to audit in older Excel workbooks.
=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3)*(C2:C100=H4), 0)) Add another (range=value) factor for each extra condition.
=INDEX(B2:E100, MATCH(H2, A2:A100, 0), MATCH(H3, B1:E1, 0)) Use this two-way lookup when one input chooses the row and another input chooses the return column.
{=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0))} In Excel 2019 and earlier, confirm with Ctrl+Shift+Enter. Excel 365 and Google Sheets accept a normal Enter.
=IFERROR(INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0)), "Not found") Wrap the formula in IFERROR to show a message instead of #N/A when nothing matches.
=INDEX(D2:D100, MATCH(1, (A2:A100="A-100")*(B2:B100="East"), 0)) Use quoted text when the criteria are fixed in the formula instead of entered in cells.
=FILTER(A2:D100, A2:A100=H2, B2:B100=H3) FILTER returns every matching row. INDEX MATCH returns the first matching value only.
=XLOOKUP(1, (A2:A100=H2)*(B2:B100=H3), D2:D100, "Not found") Shorter modern version with not-found handling built in.
Sample data
| SKU | Region | Product | Price |
|---|---|---|---|
| A-100 | East | Keyboard | 49 |
| A-100 | West | Keyboard | 52 |
| A-101 | East | Mouse | 25 |
When to use this formula
- Use this when the lookup key is split across two or more columns, such as SKU plus Region.
- Use INDEX MATCH instead of VLOOKUP, because VLOOKUP can only match a single column.
- Use the array method for reliability, or the concatenation method when you want a shorter formula.
- Use XLOOKUP instead on Excel 365 or Google Sheets if you want not-found handling built in.
- Use SUMIFS instead when you need to total values by several criteria rather than return one value.
Two criteria lookup in Excel
For a two-criteria lookup, keep the return range in INDEX and put both tests inside MATCH.
The lookup value for MATCH is 1 because multiplying TRUE/FALSE arrays creates 1 only on rows where both conditions match.
Use cell references such as H2 and H3 when users choose the lookup values, or quoted text such as "A-100" when the criteria are fixed.
=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0)) =INDEX(D2:D100, MATCH(1, (A2:A100="A-100")*(B2:B100="East"), 0)) Business case: SKU and region price
Use this pattern when one SKU can have different values by region, month, channel, or customer type.
In the sample data, H2 contains A-100 and H3 contains East. The formula finds the row where both values match and returns the aligned Price from column D.
How the multiple-criteria array works
(A2:A100=H2) returns an array of TRUE and FALSE for the first criterion, and (B2:B100=H3) does the same for the second.
Multiplying the two arrays converts them to 1 and 0, giving 1 only on rows where both criteria are true.
MATCH(1, ..., 0) finds the first row that equals 1, and INDEX returns the aligned value from the return column.
=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0)) Array vs concatenation method
The array method multiplies conditions and works with numbers, text, and dates without extra setup.
The concatenation method joins the key columns with & and is shorter to read, but a separator is required to avoid false matches.
=INDEX(D2:D100, MATCH(H2&"|"&H3, A2:A100&"|"&B2:B100, 0)) Helper column method for older workbooks
A helper column makes the lookup key visible in the sheet, which is useful when older Excel users need to debug the match row.
Create a helper key beside the source data, then match the lookup key against that single helper range.
=A2&"|"&B2 Fill this down through E100.
=INDEX(D2:D100, MATCH(H2&"|"&H3, E2:E100, 0)) Row and column two-way lookup
Use a two-way lookup when one input selects the row, such as SKU, and another input selects the return column, such as Price, Stock, or Cost.
The first MATCH finds the row position, and the second MATCH finds the column position inside the return table.
=INDEX(B2:E100, MATCH(H2, A2:A100, 0), MATCH(H3, B1:E1, 0)) H2 contains the row key and H3 contains the column header to return.
=INDEX(D2:F100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0), MATCH(H4, D1:F1, 0)) Use this when SKU and Region pick the row, and H4 picks which output column to return.
Excel 365, Excel 2021, older Excel, and Google Sheets
Excel 365 and Excel 2021 accept the array formula with a normal Enter.
Excel 2019 and earlier need Ctrl+Shift+Enter, which shows the formula wrapped in curly braces.
Google Sheets accepts the same array formula with a normal Enter. Use FILTER instead when you want every matching row rather than the first matching value.
Troubleshoot not found errors in INDEX MATCH multiple criteria
#N/A means MATCH did not find a row where every criteria test became TRUE.
Check that the return range and every criteria range start and end on the same rows, then confirm the criteria values do not contain hidden spaces or mismatched number/date formats.
In Excel 2019 and earlier, also confirm the formula with Ctrl+Shift+Enter. If the formula is entered normally in older Excel, MATCH may not evaluate the array.
=IFERROR(INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3), 0)), "Not found") =INDEX(D2:D100, MATCH(1, (TRIM(A2:A100)=TRIM(H2))*(TRIM(B2:B100)=TRIM(H3)), 0)) Duplicate matches and first-match behavior
INDEX MATCH returns the first row where all criteria match.
If your table can contain duplicate SKU and Region combinations, add another condition such as Month, Customer, or Status so the lookup key becomes unique.
Use FILTER in Google Sheets or Excel 365 when the goal is to inspect every matching row instead of returning one value.
=INDEX(D2:D100, MATCH(1, (A2:A100=H2)*(B2:B100=H3)*(C2:C100=H4), 0)) =FILTER(A2:D100, A2:A100=H2, B2:B100=H3) INDEX MATCH multiple criteria in Google Sheets
The same array formula works in Google Sheets with a normal Enter; no ArrayFormula wrapper is needed inside MATCH.
To return every matching row instead of the first, use FILTER.
=FILTER(D2:D100, A2:A100=H2, B2:B100=H3) Replace these ranges before copying
| Placeholder | Replace with | Example from this page |
|---|---|---|
| D2:D100 | The column that contains the value you want returned. | Price |
| A2:A100 | The first criteria column. | SKU |
| B2:B100 | The second criteria column. | Region |
| C2:C100 | An optional third criteria column. | Product |
| H2 | The first lookup input cell. | A-100 |
| H3 | The second lookup input cell. | East |
| E2:E100 | Optional helper keys created with =A2&"|"&B2. | A-100|East |
INDEX MATCH multiple criteria error checklist
| Symptom | Likely cause | Fix |
|---|---|---|
| #N/A in Excel 2019 or earlier | The array formula was entered with normal Enter. | Confirm with Ctrl+Shift+Enter. |
| #N/A in Excel 365 or Google Sheets | No row matches every criterion. | Check each lookup value and test one condition at a time. |
| Wrong value returned | Duplicate combinations exist and the first match is not the wanted row. | Add another criterion or use FILTER to review all matches. |
| #VALUE! error | Criteria ranges and return range do not have the same height. | Use matching row ranges, such as A2:A100, B2:B100, and D2:D100. |
| A visible match is missed | Text has hidden spaces or numbers are stored as text. | Use TRIM for text checks and align number/date formats. |
INDEX MATCH vs XLOOKUP vs FILTER vs SUMIFS
| Task | Best formula | Why |
|---|---|---|
| Return one value by two or more criteria | INDEX MATCH | Works in Excel and Google Sheets, including older Excel with Ctrl+Shift+Enter. |
| Return one value with built-in not-found text | XLOOKUP | Shorter formula in Excel 365 and Google Sheets. |
| Return every matching row | FILTER | Shows all matches instead of only the first match. |
| Add totals by several criteria | SUMIFS | Totals numbers rather than returning one row value. |
| Choose both a row and a return column | Two-way INDEX MATCH | Uses one MATCH for the row and one MATCH for the column header. |
Returned result from the sample data
| Input cell | Value | Matched row | Returned value |
|---|---|---|---|
| H2 | A-100 | Row 2: A-100, East, Keyboard, 49 | 49 |
| H3 | East | Row 2 is the first row where SKU and Region both match. | 49 |
| H2 = A-100 and H3 = West | A-100 / West | Row 3: A-100, West, Keyboard, 52 | 52 |
| H2 = A-101 and H3 = East | A-101 / East | Row 4: A-101, East, Mouse, 25 | 25 |
Input method by spreadsheet version
| App or version | How to enter the formula | Result behavior |
|---|---|---|
| Excel 365 | Press Enter. | Returns the first matching value. |
| Excel 2021 | Press Enter. | Returns the first matching value. |
| Excel 2019 and earlier | Press Ctrl+Shift+Enter. | Excel displays curly braces around the array formula. |
| Google Sheets | Press Enter. | Same array pattern works; FILTER can return all matches. |
Formula explanation
- (A2:A100=H2) returns TRUE or FALSE for the first criterion on each row.
- Multiplying by (B2:B100=H3) gives 1 only where both criteria are true.
- MATCH(1, ..., 0) finds the position of the first row that equals 1.
- INDEX(D2:D100, position) returns the value from the return column on that row.
Common errors
- Range heights differ: the criteria ranges and the return range must all cover the same rows.
- No matching combination returns #N/A unless you wrap the formula in IFERROR.
- Duplicate key combinations return the first matching row only.
- In Excel 2019 and earlier, MATCH returns #N/A unless you press Ctrl+Shift+Enter.
- Plain concatenation can give false matches unless you add a separator such as H2&"|"&H3.
Build your own version
Start with the INDEX MATCH builder for a single-criterion lookup, then add an extra (range=value) factor for each additional column. INDEX MATCH Formula Builder.
Related formulas
FAQ
How do I use INDEX MATCH with two criteria?
Multiply the conditions inside MATCH: =INDEX(return, MATCH(1, (rangeA=valueA)*(rangeB=valueB), 0)). MATCH finds the first row where both conditions are true.
Do I need Ctrl+Shift+Enter for INDEX MATCH multiple criteria?
In Excel 2019 and earlier, yes. In Excel 365 and Google Sheets, a normal Enter works because of dynamic arrays.
How do I use 3 or more criteria?
Add another (range=value) factor for each condition, such as (A2:A100=H2)*(B2:B100=H3)*(C2:C100=H4).
Why does my INDEX MATCH multiple criteria return #N/A?
Usually the ranges are different sizes, the combination does not exist, or you forgot Ctrl+Shift+Enter in older Excel.
Does this work in Google Sheets?
Yes. The same formula works in Google Sheets, or use FILTER to return all matching rows.