Free INDEX + MATCH practice

INDEX + MATCH practice exercises

INDEX with MATCH finds a value in one column and returns the matching value from any other column, even one to its left. 5 reps, from easy to hard, each checked in a real spreadsheet engine. 2 free, 3 with Pro.

=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))
Skill: INDEX + MATCH Change skill (45)

INDEX + MATCH guide

How to use INDEX + MATCH in Excel

INDEX with MATCH is the classic two-function lookup. MATCH finds the position of a value in one column, and INDEX returns the value at that position from another column. Together they can look up in any direction and work in every version of Excel.

Many analysts still prefer it to VLOOKUP, because inserting or moving columns doesn't break it, and it shows up often in finance and analyst Excel tests.

Syntax

=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))
ArgumentWhat it is
return_rangeINDEX's first argument: the column to return a value from, such as C2:C5.
lookup_valueMATCH's first argument: the value to find, such as E2.
lookup_rangeMATCH's second argument: the column to search. It must start on the same row as return_range.
0MATCH's last argument: 0 means exact match. Leave it out and MATCH does an approximate match on sorted data.

Examples

Example 1 Find a price by product code. MATCH finds P-103 in position 3 of A2:A5, and INDEX returns the 3rd value of C2:C5.
F2fx=INDEX(C2:C5,MATCH(E2,A2:A5,0))
ABCDEF
1CodeProductPriceCodePrice
2P-101Desk249P-10339
3P-102Chair129
4P-103Lamp39
5P-104Shelf89

=INDEX(C2:C5,MATCH(E2,A2:A5,0)) returns 39.

Example 2 Look up to the left. Search the product names in column B and return the code from column A.
F2fx=INDEX(A2:A5,MATCH(E2,B2:B5,0))
ABCDEF
1CodeProductPriceProductCode
2P-101Desk249ChairP-102
3P-102Chair129
4P-103Lamp39
5P-104Shelf89

=INDEX(A2:A5,MATCH(E2,B2:B5,0)) returns P-102.

Example 3 See what MATCH does on its own. MATCH returns a position, not a value. Lamp is the 3rd item in B2:B5.
F2fx=MATCH(E2,B2:B5,0)
ABCDEF
1CodeProductPriceProductPosition
2P-101Desk249Lamp3
3P-102Chair129
4P-103Lamp39
5P-104Shelf89

=MATCH(E2,B2:B5,0) returns 3.

Common mistakes

Leaving out the 0 in MATCH

Without 0, MATCH does an approximate match. A code that doesn't exist returns a nearby row's value instead of an error.

Wrong=INDEX(C2:C5,MATCH("P-105",A2:A5)) → 89

Right=INDEX(C2:C5,MATCH("P-105",A2:A5,0)) → #N/A

Ranges that start on different rows

MATCH counts from the first row of its range, and INDEX counts from the first row of its own. If one starts at row 1 (the header) and the other at row 2, every answer is off by one row.

Wrong=INDEX(C1:C5,MATCH("P-103",A2:A5,0)) → 129

Right=INDEX(C2:C5,MATCH("P-103",A2:A5,0)) → 39

INDEX + MATCH questions

Why use INDEX MATCH instead of VLOOKUP?

It can return a column to the left, it doesn't break when you insert or delete columns, and it only reads the two columns it needs. VLOOKUP needs the lookup value in the first column and a hard-coded column number.

What does the 0 in MATCH mean?

Exact match. 1 (the default) finds the largest value that is less than or equal to the lookup value in a list sorted from smallest to largest, and -1 does the same for a list sorted from largest to smallest.

Is INDEX MATCH still worth learning with XLOOKUP around?

Yes. It works in every Excel version, many existing workbooks use it, and interviewers often ask about it.

Related functions

Reading is the warm-up

The reps are what make it stick. Try INDEX + MATCH in the practice sheet above.

Practise INDEX + MATCH ↑