ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 44 · INDEX and MATCH

INDEX and MATCH in Excel

MATCH finds the position of what you are looking for, and INDEX gets the item at that position. Together they can look up in any direction, and they work in every version of Excel.

Practice this lesson →Pro lesson. The first 4 lessons are free.

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.

ABCDEF
1NameDeptID
2Ava ReyesFinance1038Find ID1047
3Ben ItoSales1041Name
4Cara NovakIT1043Dept
5Dan MossSales1047Position
6Eve LundHR1052
7Finn ShahIT1055

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?

  1. The name
  2. Where 1043 is in the list
  3. 1043
  4. 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.

INDEX and MATCH in Excel: how it works, with examples · ExcelUnpack