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))
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))
| Argument | What it is |
|---|---|
return_range | INDEX's first argument: the column to return a value from, such as C2:C5. |
lookup_value | MATCH's first argument: the value to find, such as E2. |
lookup_range | MATCH's second argument: the column to search. It must start on the same row as return_range. |
0 | MATCH's last argument: 0 means exact match. Leave it out and MATCH does an approximate match on sorted data. |
Examples
A2:A5, and INDEX returns the 3rd value of C2:C5.| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Code | Price | |
| 2 | P-101 | Desk | 249 | P-103 | 39 | |
| 3 | P-102 | Chair | 129 | |||
| 4 | P-103 | Lamp | 39 | |||
| 5 | P-104 | Shelf | 89 |
=INDEX(C2:C5,MATCH(E2,A2:A5,0)) returns 39.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Product | Code | |
| 2 | P-101 | Desk | 249 | Chair | P-102 | |
| 3 | P-102 | Chair | 129 | |||
| 4 | P-103 | Lamp | 39 | |||
| 5 | P-104 | Shelf | 89 |
=INDEX(A2:A5,MATCH(E2,B2:B5,0)) returns P-102.
B2:B5.| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Product | Position | |
| 2 | P-101 | Desk | 249 | Lamp | 3 | |
| 3 | P-102 | Chair | 129 | |||
| 4 | P-103 | Lamp | 39 | |||
| 5 | P-104 | Shelf | 89 |
=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.