ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Lookups
  3. INDEX MATCH in Excel: The Beginner's Guide

INDEX MATCH in Excel: The Beginner's Guide

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

INDEX MATCH is a lookup built from two functions. MATCH finds the position of a value in one column, and INDEX returns the item at that position from another column: =INDEX(A2:A9,MATCH(G2,B2:B9,0)). It can look left, it keeps working when columns are inserted, and it runs in every version of Excel.

Key takeaways

  • MATCH(value, range, 0) returns a position number; INDEX(range, position) returns the item at that position.
  • Together, =INDEX(return_range,MATCH(lookup_value,lookup_range,0)) looks up in any direction.
  • Always use 0 as MATCH's last argument for an exact match.
  • Both ranges must start on the same row and have the same size, or you get wrong answers.
  • INDEX MATCH works in every Excel version; XLOOKUP is the simpler choice in Excel 2021 and Microsoft 365.
On this page+
  1. What are INDEX and MATCH?
  2. How to write an INDEX MATCH Excel formula step by step
  3. Why use INDEX MATCH instead of VLOOKUP?
  4. MATCH match types: 0, 1 and -1
  5. Two-way lookups with INDEX and two MATCHes
  6. Common INDEX MATCH mistakes
  7. How to check an INDEX MATCH formula
  8. INDEX MATCH or XLOOKUP?
  9. Practise it

INDEX MATCH is a lookup made of two functions: MATCH finds where a value is, and INDEX returns what is at that place in another column. The INDEX MATCH Excel formula can look up in any direction, including to the left, and it doesn't break when columns move. This guide is for beginners who know VLOOKUP and want the next step, often for a job test.

What are INDEX and MATCH?#

Each function does half of a lookup. Learn them one at a time first, and the combined formula makes sense.

INDEX returns the item at a position#

Excel formula
=INDEX(range, row_num)

=INDEX(B2:B9,3) returns the 3rd item in B2:B9. Positions count from the first cell of the range, so B2 is position 1. INDEX can also take a column number for a table: =INDEX(A2:E9,7,3) returns row 7, column 3 of A2:E9. The INDEX function guide has more examples.

MATCH returns the position of a value#

Excel formula
=MATCH(lookup_value, lookup_array, 0)

=MATCH("Omar Haddad",B2:B9,0) returns 6, because Omar is the 6th name in the list. The 0 means exact match. MATCH doesn't return Omar's details, only his position. See the MATCH function guide for the other match types.

How to write an INDEX MATCH Excel formula step by step#

Put MATCH inside INDEX, where the position goes. Here is an employee directory where the ID is to the left of the name:

ABCDE
1Employee IDNameDepartmentOfficeExtension
2E-1042Hannah KimFinanceChicago4417
3E-1057Marcus ReidSalesAustin3302
4E-1063Elena PetrovaEngineeringSeattle5128
5E-1078David OseiMarketingChicago4490
6E-1081Grace LiuEngineeringAustin3365
7E-1095Omar HaddadSalesSeattle5101
8E-1102Julia SantosFinanceAustin3318
9E-1110Ravi MehtaHRChicago4402

You have a name in G2 and need the ID. VLOOKUP can't do this, because it only returns columns to the right of the one it searches. INDEX MATCH can:

  1. Write the MATCH. MATCH(G2,B2:B9,0) finds the row of the name in the Name column.
  2. Wrap it in INDEX. INDEX takes the column you want back, the IDs, and uses MATCH as the position.
Excel formula
=INDEX(A2:A9,MATCH(G2,B2:B9,0))

If G2 is Grace Liu, MATCH returns 5 and INDEX returns the 5th ID: E-1081.

  1. Lock the ranges before you fill down. Add $ signs to both ranges, but not to G2, so each row looks up its own name: =INDEX($A$2:$A$9,MATCH(G2,$B$2:$B$9,0)). Then fill down with Ctrl+D (Mac: ⌘D).

A good way to read the formula aloud: "Give me the ID from the row where the name matches G2."

Why use INDEX MATCH instead of VLOOKUP?#

INDEX MATCH points at two ranges instead of counting columns, and that brings three benefits:

  • It looks in any direction. The return column can be to the left or right of the search column.
  • It survives inserted columns. VLOOKUP's column number is a typed number, like 3. If someone inserts a column, the 3 still points at the old place and returns the wrong data. INDEX MATCH uses ranges, and Excel updates ranges for you.
  • It combines with other functions. You can put any calculation in MATCH. In a stock report with product names in A2:A9 and stock counts in E2:E9, this finds the product with the most stock:
Excel formula
=INDEX(A2:A9,MATCH(MAX(E2:E9),E2:E9,0))

MAX finds the biggest stock number, MATCH finds its row, and INDEX returns the product name from that row. The formula stays right when the stock numbers change.

MATCH match types: 0, 1 and -1#

MATCH's last argument sets how it matches, and for lookups you almost always want 0.

match_typeMeaningData needs to be
0Exact matchAny order
1 (default)Largest value less than or equal to the lookup valueSorted smallest to largest
-1Smallest value greater than or equal to the lookup valueSorted largest to smallest

If you leave the argument out, MATCH uses 1. On unsorted names or codes, that can return a wrong position with no error. Type the 0 every time unless you are placing numbers into bands.

Two-way lookups with INDEX and two MATCHes#

INDEX can take a row number and a column number, so you can use two MATCHes: one finds the row, the other finds the column.

Excel formula
=INDEX(A2:E9,MATCH(H11,B2:B9,0),MATCH(H12,A1:E1,0))

If H11 is "Julia Santos" and H12 is "Department", this returns Julia's department. Our two-way lookup guide explains how to line up the ranges and build a small report from one formula.

Common INDEX MATCH mistakes#

Most problems come from ranges that don't line up:

  • Ranges that start on different rows. =INDEX(A2:A9,MATCH(G2,B1:B9,0)) includes the header in MATCH, so every position is 1 too high and you get the next person's ID. There is no error, just a wrong answer.
  • Missing the 0. Without it, MATCH does an approximate match.
  • Forgetting the $ signs. The ranges slide down as you fill, and the last rows return #N/A.
  • The value really isn't there. Extra spaces or numbers stored as text also cause #N/A. Our guide on how to fix #N/A errors walks through each cause.

How to check an INDEX MATCH formula#

When a result looks wrong, check the MATCH on its own first. Two quick ways:

  • Test it in a spare cell. Copy just the MATCH part, like =MATCH(G2,B2:B9,0), into an empty cell. If it shows the position you expect, the problem is in the INDEX range. If it shows #N/A, the value isn't being found.
  • Use Evaluate Formula. Select the cell and choose Formulas > Evaluate Formula. Click Evaluate to watch Excel work out the MATCH first, then the INDEX, one step at a time.

You can also select the MATCH part inside the formula bar and press F9 to see its result. Press Esc afterwards, or the number replaces the formula.

INDEX MATCH or XLOOKUP?#

If everyone who opens your file has Excel 2021 or Microsoft 365, XLOOKUP does the same job in one function: =XLOOKUP(G2,B2:B9,A2:A9). See XLOOKUP in Excel: everything a beginner needs. INDEX MATCH is still worth knowing: it works in every version of Excel, you'll find it in many existing workbooks, and it is a classic topic in Excel interview questions.

Practise it#

INDEX MATCH clicks once you've built it a few times with your own hands. ExcelReady's INDEX and MATCH lesson takes you from each function alone to the combined lookup and a two-way lookup, in a live spreadsheet. Then test yourself with the INDEX/MATCH skill check: a stock report where you look up to the left, find the best-stocked item and build a small report. For more test-style tasks, see our list of practice tasks to do before an Excel test.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

The product names in column A are to the left of the SKUs, so VLOOKUP can't return them. Click F2 and use INDEX and MATCH to return the product name for the SKU in E2. MATCH searches B2:B6; INDEX returns from A2:A6.

fx
ABCDEFG
1
Product
SKU
Price
SKU
Product
2
Desk Lamp
DL-105
24
MA-118
3
Office Chair
OC-310
149
4
Monitor Arm
MA-118
59
5
Whiteboard
WB-402
85
6
Footrest
FR-220
32
7
8
9

Tip: Write the MATCH first: what to find, where to look, then 0. Put it inside INDEX as the position.

Practise this in a lesson

LessonINDEX and MATCHCombine INDEX and MATCH to look up in any direction, including returning a column to the left of the one you search.LessonINDEX/MATCH skill checkTest your INDEX and MATCH on a stock report: look up to the left, find the best-stocked item, and run two-way lookups across a monthly table.Function guideINDEXLearn the Excel INDEX function: return a value by row and column position, build two-way lookups with MATCH, and practice live.Function guideMATCHLearn how Excel's MATCH finds the position of a value, why the 0 matters, and how it powers INDEX/MATCH. Includes a live exercise.

Frequently asked questions

Why use INDEX MATCH instead of VLOOKUP?

+

INDEX MATCH can return a column to the left of the one you search, and it doesn't use a typed column number, so it keeps working when someone inserts or deletes a column. VLOOKUP can only look to the right.

What does the 0 mean in MATCH?

+

0 asks for an exact match. Without it, MATCH uses 1, an approximate match that expects sorted data and can return the wrong position.

Is INDEX MATCH better than XLOOKUP?

+

XLOOKUP is easier to write and read, but it needs Excel 2021 or Microsoft 365. INDEX MATCH works in every version, so it is the safer choice for files shared with people on older Excel.

Why does my INDEX MATCH return the wrong row?

+

The two ranges probably start on different rows, for example B1:B9 in MATCH and A2:A9 in INDEX. Make both ranges start and end on the same rows.

Do interviewers ask about INDEX MATCH?

+

It is a common topic in Excel tests for analyst and finance roles, because it shows you understand lookups beyond VLOOKUP. Be ready to explain what each function does on its own.

Sources

  • INDEX function - Microsoft Support
  • MATCH function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What are INDEX and MATCH?
  2. How to write an INDEX MATCH Excel formula step by step
  3. Why use INDEX MATCH instead of VLOOKUP?
  4. MATCH match types: 0, 1 and -1
  5. Two-way lookups with INDEX and two MATCHes
  6. Common INDEX MATCH mistakes
  7. How to check an INDEX MATCH formula
  8. INDEX MATCH or XLOOKUP?
  9. Practise it

Keep reading

Lookups· 6 min read

Two-Way Lookup in Excel (Row and Column)

A two-way lookup finds the value where a row and a column meet, like units sold for one product in one month. Use INDEX with two MATCHes: =INDEX(B2:E6,MATCH(H1,A2:A6,0),MATCH(H2,B1:E1,0)). The first MATCH finds the row, the second finds the column, and INDEX returns the cell where they cross.

Lookups· 7 min read

XLOOKUP in Excel: Everything a Beginner Needs

XLOOKUP finds a value in one range and returns the matching item from another: =XLOOKUP(G2,B2:B9,A2:A9). It defaults to an exact match, can return a column on either side, and has a built-in if_not_found message instead of #N/A. It needs Excel 2021, Excel 2024 or Microsoft 365; it isn't in Excel 2019 or earlier.

Lookups· 6 min read

How to Fix #N/A Errors in VLOOKUP and XLOOKUP

#N/A means "not available": the lookup couldn't find your value. First find the cause: extra spaces (fix with TRIM), numbers stored as text, a typo, or a table range that moved because it wasn't locked with $. If the item is truly missing, show a message with IFNA, or with XLOOKUP's 4th argument.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free