
Master the VLOOKUP alternative that never breaks — two-way lookups, dynamic references, and real-world examples included.
What You’ll Learn
INDEX and MATCH in Excel are the two functions that will make you feel like you have finally graduated from the beginners’ table — and once you get them, you will wonder how you ever survived without them.
Here is the thing. Most people learn VLOOKUP, use it for a year or two, and think they have lookups sorted. Then one day a colleague inserts a column into the data table, or they need to return a value from a column to the left of their search column, and VLOOKUP just falls apart. Silently. No error. Just wrong numbers flowing into a report that someone is going to present to senior management on Friday morning.
This lesson is going to save you from that Friday morning. You will learn what each function does on its own, how they work together, how to build a two-way lookup, how to handle errors gracefully, and when to use this approach over VLOOKUP. Real examples. Plain language. Formulas you can use today.
You have probably seen a VLOOKUP formula that worked fine for six months and then suddenly started returning wrong data. Nobody touched the formula. Something changed in the table, and VLOOKUP quietly broke. Here is what VLOOKUP cannot do:
These are not rare problems. These are the everyday reality of working with data that other people also touch. INDEX and MATCH in Excel were built for exactly this kind of messiness.
Instead of one function trying to do everything and cutting corners along the way, INDEX MATCH splits the job cleanly in two. One function finds where something is. The other retrieves what is there. That separation is what gives you flexibility that VLOOKUP just cannot match.
INDEX is simpler than most people expect. It returns the value of a cell at a specific position inside a range. Think of it as coordinates — you tell INDEX which range to look in, which row to go to, and optionally which column, and it returns whatever is at that intersection.
Say you have a list in cells A1 to A5: London, Paris, Berlin, Madrid, Rome. The formula =INDEX(A1:A5, 3) returns Berlin. INDEX went to position 3 in that range and handed back the value.
The obvious question is: how do you know which row number to ask for when you are working with real data? You will not always know it. That is the job of MATCH.
When your array is one column, you only need row_num. When it is one row, you only need col_num. When it covers both rows and columns — like a pricing table — you need both. You will see this play out in the two-way lookup section shortly.
MATCH searches for a value inside a row or column and returns its position as a number — not the value itself, just the number that tells you where it sits.
This is the single most important concept in this entire lesson. MATCH does not return the value you are looking for. It returns a number telling you where that value lives.
Using that same city list in A1:A5, the formula =MATCH("Berlin", A1:A5, 0) returns 3. Not Berlin — the number 3. Because Berlin is the third item in that range.
That number 3 is precisely what INDEX needs to retrieve the right result. You can already see these two functions are designed to hand off to each other.
| match_type | Behaviour | When to Use |
|---|---|---|
| 0 | Exact match only | Almost all business lookups — use this by default |
| 1 | Less than or equal to (data must be sorted ascending) | Tax brackets, tiered pricing, grade bands |
| -1 | Greater than or equal to (data must be sorted descending) | Reverse-sorted threshold lookups |
Here is an analogy that makes this click for most people. Imagine you are looking for a book in a library. MATCH is the catalogue — you search it and it tells you the book is on shelf 7. INDEX is you physically walking to shelf 7 and picking it up. MATCH gives you the location. INDEX does the retrieval.
That is the entire relationship between these two functions.
Here is a real scenario. You have an employee table. Names are in column A. Employee IDs are in column B. You want to type an ID into cell E2 and get the corresponding name back. VLOOKUP cannot do this — the return column A is to the left of the lookup column B. INDEX MATCH handles it without any issue.
Step-by-Step: Your First INDEX MATCH Formula
Advertisement-X
=MATCH(E2, B:B, 0) — this returns the row number where the ID appears in column B.=INDEX(A:A, MATCH(E2, B:B, 0)) — INDEX takes that row number and returns the name from column A.Formula Breakdown
=INDEX( A:A, MATCH( E2, B:B, 0 ) )
A:A — Go to column A to retrieve your answer (employee names)
E2 — Find the value in cell E2 (the ID you typed)
B:B — By searching in column B (employee IDs)
0 — Using an exact match
Read inside out: MATCH runs first → hands a row number to INDEX → INDEX returns the value at that row.
💡 PRO TIP
Before you nest MATCH inside INDEX, test it on its own. Click an empty cell and type only: =MATCH(E2, B:B, 0). If it gives you a row number, your lookup is working. If it throws an error, you know the problem is in the MATCH part, not INDEX. Always build in layers — it saves you a lot of troubleshooting time.
Trust me on this — the ability to look left is more useful than it sounds. In the real world, ID columns, code columns, and key columns sit all over the place. INDEX and MATCH in Excel do not care which side of the lookup column your answer is on.
With the Excel INDEX MATCH formula, you reference your return column by address — not by a hard-coded number. Insert or delete a column in your table and the formula adjusts automatically. Your VLOOKUP would have already returned the wrong data without telling you.
MATCH searches one column. INDEX retrieves from one column. VLOOKUP reads across the entire table width every time. On large data ranges this performance difference becomes noticeable.
If your table is small, stable, and the lookup column will always sit on the left — VLOOKUP is perfectly fine. There is no point adding complexity where none is needed. INDEX and MATCH in Excel simply give you better options when your data is less predictable or more dynamic.
To compare both approaches side by side and decide which fits your data, see the XplorExcel lesson on VLOOKUP and HLOOKUP.
⚠️ COMMON MISTAKE
Never leave the match_type argument blank. Writing =MATCH(E2, B:B) without a third argument defaults to 1, which requires your data to be sorted ascending. On unsorted data this returns an incorrect row number — and your INDEX formula returns the wrong answer with zero indication that anything went wrong. Write the 0. Every time.
A one-way lookup returns a value from a column based on a row match. A two-way lookup returns the value at the intersection of a specific row AND a specific column — matching in both directions at the same time.
This is something VLOOKUP simply cannot do. INDEX MATCH with two MATCH functions inside it absolutely can.
Two-Way Lookup Formula
=INDEX(table_range, MATCH(row_value, row_labels, 0), MATCH(col_value, col_labels, 0))
The first MATCH finds the row. The second MATCH finds the column. INDEX uses both coordinates to return the value at that exact intersection.
You have a pricing table. Products listed down column A (rows 2 to 6). Customer tier headers — Bronze, Silver, Gold — across row 1 (columns B to D). You want to return the right price automatically based on a product selected in G2 and a tier selected in H2.
Pricing Matrix Formula
=INDEX(B2:D6, MATCH(G2, A2:A6, 0), MATCH(H2, B1:D1, 0))
MATCH(G2, A2:A6, 0) — finds the row for the selected product
MATCH(H2, B1:D1, 0) — finds the column for the selected tier
INDEX(B2:D6, …) — returns the price at that exact row/column intersection
When your formula returns #N/A, it means MATCH could not find the lookup value in the lookup range. Common culprits are a number stored as text, trailing spaces you cannot see, or a value that simply does not exist in your data. Check the data first. Then fix the formula.
Once you are confident your formula logic is correct and the error is just handling for genuinely missing values, wrap the whole thing in IFERROR.
With Error Handling
=IFERROR(INDEX(A:A, MATCH(E2, B:B, 0)), “Not found”)
If the lookup succeeds, you get your result. If MATCH cannot find the value, you get “Not found” instead of a red error cell. For a full breakdown of IFERROR and how to use it across different scenarios, see the XplorExcel lesson on IF and IFERROR functions.
An HR manager has a staff database where Employee ID is in column C, not column A. They need to return the employee name from column A by searching for an ID. One formula: =INDEX(A:A, MATCH(search_cell, C:C, 0)). Done. VLOOKUP would not even start.
A finance analyst pulls monthly actuals from a system export where the column order changes every month. With VLOOKUP they were updating the column index number every month manually. With INDEX and MATCH in Excel, the formula references the header name and finds the right column automatically every time — regardless of where it has ended up.
A sales team has a pricing grid — products down the rows, customer tiers across the columns. They use dropdowns for product and tier, and a two-way INDEX MATCH formula returns the correct price instantly. No manual table hunting. No copy-paste errors. The formula does the work.
If you are on Microsoft 365 or Excel 2021 or later, XLOOKUP is available and it handles many of the same scenarios with a simpler syntax. Left lookups, built-in error handling, and returning full rows or columns are all easier in XLOOKUP.
Here is the thing though — INDEX and MATCH in Excel are not going anywhere, for two very good reasons. First, they work in every version of Excel from 2010 onwards. If you share files with colleagues on older versions, INDEX MATCH is the safe choice. XLOOKUP will break in Excel 2019 and earlier. Second, the two-way lookup with two MATCH functions inside INDEX is still one of the cleanest solutions available for grid-based lookups.
If your team uses mixed Excel versions, INDEX MATCH is the version-safe formula to use across the board.
All Formulas at a Glance
Basic INDEX MATCH
=INDEX(return_column, MATCH(lookup_value, lookup_column, 0))
With IFERROR Error Handling
=IFERROR(INDEX(return_column, MATCH(lookup_value, lookup_column, 0)), “Not found”)
Two-Way Lookup
=INDEX(table_range, MATCH(row_value, row_labels, 0), MATCH(col_value, col_labels, 0))
Test MATCH on Its Own First
=MATCH(lookup_value, lookup_column, 0)
🧪 Hands-On Exercise
Open a blank Excel workbook and type in this small table:
| Column A | Column B | Column C |
|---|---|---|
| Product A | 101 | 15.00 |
| Product B | 204 | 22.50 |
| Product C | 309 | 8.75 |
| Product D | 412 | 31.00 |
| Product E | 517 | 19.99 |
=INDEX(A1:A5, MATCH(E1, B1:B5, 0)) — your result should be Product C.=INDEX(C1:C5, MATCH(E1, B1:B5, 0)) — with E1 as 412, you should get 31.00.Can INDEX MATCH replace VLOOKUP entirely?
For most lookup tasks, yes. INDEX and MATCH in Excel handle everything VLOOKUP can do, plus the scenarios where VLOOKUP breaks. The only reason to stick with VLOOKUP is if it is already working in a stable table and changing it adds unnecessary risk.
Does INDEX MATCH work with multiple criteria?
Yes, but it requires an array formula approach where you combine multiple MATCH conditions using multiplication inside the formula. This is an advanced technique covered in a separate XplorExcel lesson on multi-criteria lookups.
Why is my INDEX MATCH returning the wrong value?
Nine times out of ten it is a missing or incorrect match_type in MATCH. Check that you have written 0 as the third argument. Also check that your lookup value and the data in your lookup array are stored in the same format — a number stored as text looks identical on screen but will not match a genuine number.
📚 Further Reading
The definitive syntax reference for INDEX, including all optional arguments and array usage.
One of the most thorough free INDEX MATCH references available, with worked examples and pattern variations.
← Previous Lesson
VLOOKUP & HLOOKUP in ExcelNext Lesson →
Text Functions in ExcelAdvertisement-X