INDEX MATCH in Excel — Complete Guide to the Most Powerful Lookup Formula
INDEX MATCH is the professional Excel standard for lookups — more flexible than VLOOKUP, faster on large datasets, and capable of two-way lookups, left lookups, and multiple criteria that VLOOKUP simply cannot do. This guide covers everything from your first formula to advanced array-based multi-criteria matching, with a live formula builder so you can generate the exact syntax for your data.
TL;DR
INDEX MATCH pairs two functions: MATCH finds the row number of your lookup value, and INDEX uses that row number to return a value from any column. The core formula is =INDEX(ReturnRange, MATCH(LookupValue, LookupRange, 0)). Use it instead of VLOOKUP whenever your lookup column is not the leftmost column, your table structure might change, or you need to match on multiple criteria.
Contents
- Why INDEX-MATCH?
- The INDEX function explained
- The MATCH function explained
- Interactive formula builder
- VLOOKUP vs INDEX-MATCH diagram
- Step 1 — Your first INDEX-MATCH
- Step 2 — Looking left
- Step 3 — Two-way lookup
- Step 4 — Multiple criteria
- Step 5 — Error handling with IFERROR
- Step 6 — Performance
- Step 7 — When to use XLOOKUP instead
- Full comparison table
- Common mistakes
- FAQ
Why INDEX-MATCH?
INDEX-MATCH is not a single Excel function — it is two functions used together. INDEX returns the value at a specific position within a range. MATCH finds the position of a value within a range. Nested together, they replicate everything VLOOKUP does and add capabilities that VLOOKUP will never have.
VLOOKUP has one core limitation that frustrates analysts every day: it can only look to the right. Your lookup column must be the leftmost column of the range, and you specify the return column as a number (1, 2, 3…). If you insert a new column into the middle of your table, every VLOOKUP counting past that column suddenly returns the wrong data — silently, with no error.
INDEX-MATCH solves both problems. The lookup range and return range are specified independently, so they can be in any order — the return range can be to the left, to the right, or in a completely different part of the spreadsheet. And because you reference actual ranges rather than counting column positions, inserting or deleting columns never breaks anything.
You absolutely need INDEX-MATCH over VLOOKUP when:
- Your lookup column is not the first (leftmost) column of the table
- The table structure changes frequently — columns get inserted, reordered, or removed
- You need to match on two or more criteria simultaneously
- You are working with large datasets (50,000+ rows) where speed matters
- You need a two-way lookup by both row label and column label
Market context: INDEX-MATCH has been the professional Excel standard for 20 years. XLOOKUP (Excel 365 and Excel 2021 only) is the modern successor and is simpler for basic cases — but INDEX-MATCH works in every version of Excel from 2003 onwards and remains essential knowledge for any analyst working in a mixed-version environment.
The INDEX Function Explained
The INDEX function returns the value at a specified row (and optionally column) within a range.
| Argument | Required? | What it means |
|---|---|---|
array | Yes | The range you want to return a value from. Can be a single column, single row, or a multi-column block. |
row_num | Yes | Which row to return. 1 = the first row of the array. |
col_num | No | Which column to return. Omit if array is a single column. 1 = the first column of the array. |
Returns the 3rd value in column A.
Returns the value from row 3, column 2 of the range A1:C10 — cell B3.
The MATCH Function Explained
MATCH searches a single row or column for a value and returns the position number where it was found — not the value itself.
| Argument | What it means |
|---|---|
lookup_value | The value you are searching for. Can be text, number, date, or a cell reference. |
lookup_array | A single row or column to search in. Must be one-dimensional. |
match_type | 0 = exact match (use this 95% of the time). 1 = largest value ≤ lookup value (ascending sort required). -1 = smallest value ≥ lookup value (descending sort required). |
If "London" is in cell A7 of a list in A1:A20:
Returns 7 — London is the 7th item in the array.
Interactive Formula Builder
Fill in your actual range references and the formula updates live. Switch between single-lookup and two-way lookup mode with the toggle.
VLOOKUP vs INDEX-MATCH: Side-by-Side Diagram
The diagram below shows why VLOOKUP fails when the return column is to the left of the lookup column, and how INDEX-MATCH handles it natively.
Step 1.Your First INDEX-MATCH
Scenario: you have a customer table with CustomerID in column D, Name in column E, Email in column F, and Revenue in column G. In cell A2 you have a CustomerID and you want the Email. VLOOKUP would require CustomerID to be the first column — here it is column D, which is fine for VLOOKUP if the return column is to the right. But what if the structure changes? INDEX-MATCH handles it robustly regardless.
| D: CustomerID | E: Name | F: Email | G: Revenue |
|---|---|---|---|
| CUST-001 | Alice Martin | alice@example.com | £4,200 |
| CUST-002 | Bob Chen | bob@example.com | £1,850 |
| CUST-003 | Carol White | carol@example.com | £7,300 |
Step by step:
MATCH(A2, $D$2:$D$1000, 0)— searches column D for the value in A2 (e.g. "CUST-002") and returns its position within the range. If CUST-002 is the 2nd item in the range, MATCH returns 2.INDEX($F$2:$F$1000, 2)— returns the 2nd value from column F, which is "bob@example.com".- Because both ranges start at row 2, the position offset is always consistent.
Why the $ signs matter: $F$2:$F$1000 is an absolute reference — it does not change when you drag the formula down. A2 without $ is a relative reference: it becomes A3, A4… as you drag down, so each row looks up its own customer ID. This is exactly the right behaviour.
Step 2.Looking Left — The Key Advantage
VLOOKUP cannot look left. If your lookup column is column C and you want to return a value from column A (to the left), VLOOKUP returns an error. INDEX-MATCH handles this trivially because the two ranges are independent.
| A: Name | B: Department | C: Employee ID | D: Salary |
|---|---|---|---|
| Alice Martin | Engineering | EMP-001 | £72,000 |
| Bob Chen | Marketing | EMP-002 | £58,000 |
| Carol White | Finance | EMP-003 | £65,000 |
You have EMP-002 in cell F2 and want the Name from column A (to the left of the lookup column C):
The return range ($A$2:$A$1000) is entirely to the left of the lookup range ($C$2:$C$1000). This works identically whether the return column is left, right, or non-adjacent. You can use the same MATCH to return values from multiple columns by writing separate INDEX formulas each with a different return range.
=VLOOKUP(F2, A:C, -1, 0) to look left — this returns #VALUE!. INDEX-MATCH is the correct tool for left lookups.This is the single most common reason professionals switch from VLOOKUP to INDEX-MATCH. Once your data has the lookup column anywhere other than the leftmost position — which happens frequently with real-world data from databases or exported reports — you need INDEX-MATCH.
Step 3.Two-Way INDEX-MATCH (Row AND Column Lookup)
A two-way lookup finds a value at the intersection of a specific row and column. The classic use case is a price matrix: products on rows, customer tiers on columns.
| Bronze | Silver | Gold | Platinum | |
|---|---|---|---|---|
| Widget A | £10.00 | £9.00 | £7.50 | £6.00 |
| Widget B | £18.00 | £16.00 | £13.00 | £10.50 |
| Widget C | £24.00 | £21.50 | £18.00 | £14.00 |
Row headers (product names) in A2:A4, column headers (tiers) in B1:E1, price data in B2:E4. Product name in H2, tier in H3:
Breakdown:
MATCH(H2, $A$2:$A$4, 0)— finds the row position of the product (e.g. "Widget B" returns 2)MATCH(H3, $B$1:$E$1, 0)— finds the column position of the tier (e.g. "Gold" returns 3)INDEX($B$2:$E$4, 2, 3)— returns the value at row 2, column 3 = £13.00
=INDEX(PriceTable, MATCH(H2, Products, 0), MATCH(H3, Tiers, 0)).Critical setup rule: the data table must not include the row or column headers. The data table (B2:E4) starts one row below and one column to the right of the header ranges. Both MATCH functions return positions within their respective 1-dimensional ranges, and INDEX uses those positions within the data body.
Step 4.INDEX-MATCH with Multiple Criteria
VLOOKUP can only match on one column. INDEX-MATCH with multiple criteria is one of the most powerful Excel techniques available. The technique uses array multiplication of Boolean conditions — when all conditions are met, the product is 1; when any condition fails, the product is 0.
Two-criteria example
Salesperson in column A, Product in column B, Revenue in column C. You want the revenue where Salesperson = E2 AND Product = F2:
{=INDEX(...)} to confirm it is an array formula. In Excel 365 and 2021, press Enter normally.How it works: ($A$2:$A$1000=E2) produces an array of TRUE/FALSE for each row where Salesperson matches. ($B$2:$B$1000=F2) does the same for Product. Multiplying them gives 1 only where both are TRUE. MATCH(1, ..., 0) finds the first row where the product is 1.
Three-criteria extension
Add another multiplication term for each additional criterion. For very large datasets (100k+ rows), consider adding a concatenated helper column instead to avoid performance degradation.
=XLOOKUP or =FILTER for multiple-criteria lookups with simpler syntax. INDEX-MATCH multiple criteria is the go-to for Excel 2016/2019 compatibility.Step 5.IFERROR Wrapping and Error Handling
When MATCH cannot find the lookup value it returns #N/A, which propagates to INDEX. Wrap the formula with IFERROR to handle this gracefully:
Common fallback values: "Not Found" for text columns, 0 for numeric columns (careful — this can be confused with a real zero), "" to return a blank cell.
IFNA instead of IFERROR if you only want to catch #N/A and still see other errors like #REF!: =IFNA(INDEX(..., MATCH(...)), "Not Found"). This helps surface genuine formula errors rather than silently hiding them.Common causes of #N/A: lookup value genuinely not in the range; extra spaces in the data (use TRIM); number stored as text vs actual number; match type set to 1 on unsorted data.
Step 6.Performance — Why INDEX-MATCH is Faster
On small datasets the difference is negligible. On large datasets, the gap is real. VLOOKUP loads the entire table_array into memory and scans from left to right on every recalculation. MATCH with match_type 0 operates on a single column and stops immediately when the match is found.
| Dataset size | VLOOKUP | INDEX-MATCH exact (0) | INDEX-MATCH sorted (1) |
|---|---|---|---|
| 10,000 rows | ~0.03s | ~0.02s | <0.01s |
| 100,000 rows | ~0.25s | ~0.12s | ~0.01s |
| 500,000 rows | ~1.2s | ~0.4s | ~0.02s |
The most dramatic gain comes from match_type 1 (binary search) on a sorted lookup column. Binary search is O(log n) versus O(n) for a linear scan — 500K rows becomes almost instantaneous.
Step 7.When to Use XLOOKUP Instead
XLOOKUP (Excel 365 and Excel 2021+) is the modern successor with cleaner syntax for common cases:
XLOOKUP advantages: simpler syntax, built-in not-found parameter (no IFERROR wrapper needed), can return multiple columns natively, can search from last to first with search_mode -1.
Stick with INDEX-MATCH when:
- Compatibility — Excel 2016 or 2019 users on the team. XLOOKUP returns #NAME? in those versions.
- Two-way lookups — INDEX-MATCH-MATCH is more readable than nested XLOOKUP for row+column lookups.
- Binary search performance — match_type 1 on sorted data is the fastest possible Excel lookup for large datasets.
- Institutional templates — team has standardised on INDEX-MATCH for consistency across model files.
VLOOKUP vs INDEX-MATCH vs XLOOKUP: Full Comparison
| Feature | VLOOKUP | INDEX-MATCH | XLOOKUP |
|---|---|---|---|
| Excel 2016/2019 support | Yes | Yes | No |
| Look left (return col before lookup col) | No | Yes | Yes |
| Two-way (row + column) lookup | No | Yes | Nested only |
| Multiple criteria | No | Yes (array) | No (use FILTER) |
| Built-in not-found handling | Needs IFERROR | Needs IFERROR | 4th argument |
| Return multiple columns | No | Separate formulas | Yes (native) |
| Binary search on sorted data | Yes (type 1) | Yes (match_type 1) | Yes (search_mode 2) |
| Safe when columns inserted | No (index breaks) | Yes | Yes |
| Search from last to first | No | No | Yes (search_mode -1) |
| Wildcard support | Yes | Yes (match_type 0) | Yes (match_mode 2) |
📥 Free INDEX-MATCH Excel Template
Upload your data to DataHub Pro and get automated lookups, cross-table joins, and data validation — no formula work required.
Get your free DataHub Pro account →Common Mistakes
1. Forgetting to lock ranges with $ signs
When you drag a formula down, unlocked ranges shift by one row per cell. D2:D1000 becomes D3:D1001 in the next row — your lookup range is now off by one and the formula returns wrong values silently. Always use $D$2:$D$1000 for lookup and return ranges. Only leave the lookup value cell (A2) without $ so it advances with each row.
2. Using match_type 1 instead of 0 on unsorted data
This is the most dangerous mistake because it produces wrong results with no error. Match type 1 uses binary search and assumes ascending sort order. On unsorted data it returns the last value that is less than or equal to the lookup value — which could be any row. Default to 0 for exact match in all cases unless you have explicitly sorted and will keep sorted.
3. Lookup range and return range different sizes
If your lookup range is $D$2:$D$100 but your return range is $F$2:$F$200, MATCH might return position 85, but INDEX looks up position 85 within $F$2:$F$200 — a completely different row than intended. Both ranges must start at the same row and span the same number of rows.
4. Not using Ctrl+Shift+Enter for array formulas in Excel 2019
The multiple-criteria formula is an array formula in Excel 2019 and earlier. Pressing Enter alone causes MATCH to see only the first cell value rather than the full array, returning a wrong row. Confirm with Ctrl+Shift+Enter and check for curly braces {=...} in the formula bar.
Stop writing lookups by hand
DataHub Pro joins, filters, and cross-references your data automatically. Connect your Excel files, Google Sheets, or database and get clean joined tables in seconds.
Try DataHub Pro free →Frequently asked questions
What is the difference between INDEX MATCH and VLOOKUP?
How do I use INDEX MATCH with multiple criteria?
=INDEX(ReturnRange, MATCH(1, (Criteria1Range=Value1)*(Criteria2Range=Value2), 0)). In Excel 2019 and earlier, confirm with Ctrl+Shift+Enter instead of just Enter — Excel wraps it in curly braces {=...} to indicate an array formula. In Excel 365 and Excel 2021, just press Enter normally as these versions support dynamic arrays natively. You can extend to three or more criteria by multiplying additional Boolean arrays: *(Criteria3Range=Value3). The 1 in the MATCH function is the target — the multiplication of the Boolean arrays produces 1 only when ALL conditions are met simultaneously, so MATCH finds the first row where every criterion is satisfied.Why does INDEX MATCH return a wrong value?
How do I do a two-way lookup with INDEX MATCH?
=INDEX(DataTable, MATCH(RowLookupValue, RowHeaders, 0), MATCH(ColLookupValue, ColHeaders, 0)). DataTable is the data body (not including the row or column headers). RowHeaders is the single column of row labels. ColHeaders is the single row of column labels. The first MATCH finds which row the row lookup value appears in, and the second MATCH finds which column the column lookup value appears in. INDEX then returns the cell at that intersection. This is particularly useful for price matrices, scheduling grids, and any cross-tabulated reference table.Is INDEX MATCH faster than VLOOKUP?
How do I use INDEX MATCH across multiple sheets?
=INDEX(Sheet2!$B$2:$B$1000, MATCH(A2, Sheet2!$A$2:$A$1000, 0)). The sheet name is prefixed with an exclamation mark before the cell reference. If the sheet name contains spaces, wrap it in single quotes: =INDEX('Sales Data'!$B$2:$B$1000, MATCH(A2, 'Sales Data'!$A$2:$A$1000, 0)). You can also reference a closed workbook by including the file name in square brackets before the sheet name, though Excel will prompt you to update links when the source file is closed.What is the MATCH function return value?
Can INDEX MATCH return multiple values?
=FILTER(ReturnRange, LookupRange=LookupValue) — this returns all matching rows as a dynamic spill array, no array formula entry required. In older Excel versions, you need an array formula with SMALL and IF entered with Ctrl+Shift+Enter and dragged down. If you are on Excel 365, FILTER is far simpler and should be preferred for returning multiple results.How do I use INDEX MATCH with wildcard characters?
=INDEX(B2:B100, MATCH("Smith*", A2:A100, 0)). You can also reference a cell and concatenate: =INDEX(B2:B100, MATCH(D2&"*", A2:A100, 0)) where D2 contains the partial value. Wildcards only work with match_type 0. For case-sensitive wildcard matching you need to combine with EXACT inside an array formula.Should I use INDEX MATCH or XLOOKUP?
=XLOOKUP(lookup_value, lookup_array, return_array, "Not Found") handles left lookups, has a built-in not-found parameter, and can return entire rows or columns natively. Use INDEX MATCH when you need compatibility with Excel 2016 or 2019; when you need a two-way row-and-column lookup (INDEX-MATCH-MATCH is more explicit than nested XLOOKUP); when working in a shared file where some users have older Excel; or when you need binary search performance on large sorted datasets. Both are professional-grade solutions — the choice is primarily about compatibility and team context.Further reading
- DataHub Pro — VLOOKUP in Excel guide (understand the function INDEX-MATCH replaces).
- DataHub Pro — Pivot Tables in Excel (the complement to lookups for summarising data).
- DataHub Pro — Cohort analysis in Excel (uses MINIFS and COUNTIFS alongside INDEX-MATCH patterns).
- DataHub Pro — All Excel analytics tutorials.
