What you will learn
- Find a position with MATCH
- Get an item with INDEX
- Look up in any direction
How it works
MATCH(what, list, 0) tells you the position. Is it 1st, 2nd or 3rd?
INDEX(list, 4) gets the 4th item in a list.
Put them together to find a name from an ID. Then change the ID in F2 and watch the answer change!
Formulas at a glance
=MATCH(F2,C2:C7,0) | which position? |
=INDEX(A2:A7, MATCH(…)) | return that item |
Example
Write the formula to find the position of the ID (F2) in the ID list.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Name | Dept | ID | |||
| 2 | Ava Reyes | Finance | 1038 | Find ID | 1047 | |
| 3 | Ben Ito | Sales | 1041 | Name | ||
| 4 | Cara Novak | IT | 1043 | Dept | ||
| 5 | Dan Moss | Sales | 1047 | Position | ||
| 6 | Eve Lund | HR | 1052 | |||
| 7 | Finn Shah | IT | 1055 |
Click F5 and type =MATCH(F2,C2:C7,0), then press Enter.
The answer is 4.
When to use it
- Finding a name from an ID that is to its right
- Lookups that keep working when columns move
- Any lookup VLOOKUP can’t do
Common mistakes
- Lists of different sizesThe INDEX list and the MATCH list must cover the same rows.
- Leaving out the 0 in MATCHUse 0 for an exact match.
- Putting MATCH outside INDEXMATCH goes inside: =INDEX(list, MATCH(…)).
Quick check
What does =MATCH(1043, C2:C7, 0) give?
- The name
- Where 1043 is in the list
- 1043
- TRUE
Show the answer
B. Where 1043 is in the list MATCH gives a position, like 3.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.