Excel function

INDEXfunction

Returns the value at a given row and column position inside a range.

All versions
=INDEX(A2:D9, 4, 3)
A
B
C
D
1
2
3
4
5
6
7
8
9

Drag the corner dots to change array. Click the numbers on the left to change row_num. Click the numbers on the top to change column_num. Click a cell inside the range to set both row_num and col_num. Shrink the range to trigger #REF!. Try breaking it on purpose to see the errors.

Result

6900

array
A2:D9Drag the corner dots on the table

The range to pick from.

row_num
4array has 8 rows

The row position inside the range. The first row is 1.

column_num
3array has 4 columns

The column position inside the range. The first column is 1.

What is the INDEX function?

=INDEX(array, row_num, [column_num])

INDEX returns the value at a given position inside a range. It doesn't search for anything; you tell it the row and column numbers and it goes straight there.

The numbers are counted inside the range, not on the sheet. If the range starts at row 2, row 2 of the sheet is row_num 1.

On its own INDEX is simple. Combined with MATCH, which finds the position of a value, it becomes a flexible lookup that works in every Excel version.

Arguments

array
The range to pick a value from.
row_num
The row position inside array. The first row is 1.
column_num
The column position inside array. You can leave it out when array is a single column.

INDEX examples

  1. Example 1. Get the 4th row, 3rd column

    =INDEX(A2:D9, 4, 3)

    The 4th row of the range is P004 and the 3rd column is Price, so the result is 6900.

  2. Example 2. INDEX with MATCH

    =INDEX(C2:C9, MATCH("Eggs", B2:B9, 0))

    MATCH finds that Eggs is in position 4, and INDEX returns the 4th value of the Price column, 6900. The return column can be anywhere, even to the left.

Common mistakes

FAQ

Why use INDEX/MATCH instead of VLOOKUP?
It can return a column on either side, it doesn't break when columns are inserted, and it works in every Excel version.