Skip to content

Excel function guide · Lookup

INDEX and MATCH in Excel

MATCH returns the position of a value in a range, and INDEX returns the value at a given position. Together, INDEX(return_range, MATCH(value, lookup_range, 0)) is a lookup that works in every version of Excel and can return any column, including ones to the left.

Syntax

=INDEX(array, row_num, [column_num])
=MATCH(lookup_value, lookup_array, [match_type])
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))
ArgumentRequired?What it means
array (INDEX)RequiredThe range to return a value from.
row_num (INDEX)RequiredWhich row of array to return; in a lookup, this is MATCH's result.
column_num (INDEX)OptionalWhich column of array, when array has more than one column.
lookup_value (MATCH)RequiredThe value to find.
lookup_array (MATCH)RequiredThe single row or column to search.
match_type (MATCH)Optional0 exact match. 1 (the default) largest value ≤ lookup_value in ascending data; -1 smallest value ≥ it in descending data.

INDEX and MATCH examples

Every example uses this small table. The results are what Excel shows in the cell.

ABCD
1ProductSKUUnitsRevenue
2Desk lampP-1101204,680
3Office chairP-205358,400
4Monitor armP-318645,440
5Standing deskP-402126,240
6WebcamP-517885,720
  1. 1. Revenue for a SKU

    =INDEX(D2:D6, MATCH("P-318", B2:B6, 0))

    Result: 5,440

    MATCH finds P-318 in position 3 of B2:B6; INDEX returns the 3rd value of D2:D6.

  2. 2. Look to the left

    =INDEX(A2:A6, MATCH("P-402", B2:B6, 0))

    Result: Standing desk

    The product name is to the left of the SKU column. INDEX can return from any range, so that's no problem.

  3. 3. Two-way lookup

    =INDEX(A2:D6, MATCH("P-205", B2:B6, 0), MATCH("Revenue", A1:D1, 0))

    Result: 8,400

    One MATCH picks the row and another picks the column by its header, so the formula keeps working if columns are rearranged.

Try it now

Practise INDEX and MATCH in a live sheet.

Type each formula yourself. Answers are checked by the same engine as the full course. No account needed.

Try it · INDEX and MATCH
0 XP
F3
A
B
C
D
E
F
1
Product
SKU
Units
Revenue
Find
Answer
2
Desk lamp
P-110
120
4680
SKU
P-205
3
Office chair
P-205
35
8400
Position
4
Monitor arm
P-318
64
5440
Units
5
Standing desk
P-402
12
6240
Product
6
Webcam
P-517
88
5720
7
8
Double-click or start typing to edit

Step 1 of 3

In F3, use MATCH to find the position of the SKU in F2 within B2:B6 (exact match).

Common INDEX and MATCH mistakes

Practise this in Excel Quest

INDEX & MATCH Members

Course 6 · Lookups & Relationships · 12 min

Find positions with MATCH, return values with INDEX, then combine them into two-way lookups on a sales matrix.

This lesson is included in Formula Quest memberships. A free account starts you on the free lessons of the Excel Quest curriculum.

Related functions

All Excel function guides