Excel INDEX function
INDEX takes a rectangle and returns whatever sits at row N, column M. It does no searching by itself, but paired with MATCH it looks in any direction, and it survives inserted columns better than VLOOKUP — the coordinates are calculated, not counted by hand.
Lookup & reference · Available in: Excel 97 and every desktop version since
Syntax
INDEX(array, row_num, [column_num])What it returns The value (or reference) at the intersection of the given row and column inside the range.
| Arguments | ||
|---|---|---|
| array | required | The rectangular range to read from. |
| row_num | required | Which row of the range, counting from 1. Zero means the whole column. |
| column_num | optional | Which column of the range, counting from 1. Can be omitted when the range is a single column. |
Examples
One cell by row and column
| Q1 | Q2 | Q3 | |
| North | 120 | 140 | 160 |
| South | 90 | 110 | 130 |
= INDEX(B2:D3,2,3)→ 130
Row 2 of B2:D3 is the South row and column 3 is Q3, so the intersection is 130. Note that 2 means "the second row of the range", which is worksheet row 3 — the off-by-one that trips everyone up.
Two-way lookup with MATCH
| Q1 | Q2 | Q3 | |
| North | 120 | 140 | 160 |
| South | 90 | 110 | 130 |
= INDEX(B2:D3,MATCH("South",A2:A3,0),MATCH("Q2",B1:D1,0))→ 110
MATCH works out "row 2" and "column 2", then INDEX reads the crossing point. Reorder the rows, insert a column, and the formula still works — which is why this pattern outlives VLOOKUP.
Common mistakes
- 1.Passing a worksheet row number as row_num. INDEX(A1:C10,5,2) reads the fifth row of the range; if the range starts at A3, that is worksheet row 7.
- 2.Using 0 to return a whole row or column in an older version and pressing Enter as usual. Only dynamic arrays spill; before that you select the target range and press Ctrl+Shift+Enter.
- 3.Not knowing INDEX returns a reference, so INDEX(A:A,3):INDEX(A:A,10) makes a dynamic range without the volatile OFFSET.
How to use it
- 1.Click the cell where the result should appear.
- 2.Type = then the function name, and press Tab to accept it.
- 3.Enter each argument separated by commas; ranges can be dragged with the mouse.
- 4.Press Enter. Drag the fill handle down if the same formula applies to more rows.
Frequently asked questions
What is the syntax of INDEX?
INDEX(array, row_num, [column_num]). What it returns: The value (or reference) at the intersection of the given row and column inside the range.
Which Excel versions support INDEX?
Excel 97 and every desktop version since. It is available in every desktop version unless the note above says otherwise.
Why does INDEX return an error instead of a value?
Passing a worksheet row number as row_num. INDEX(A1:C10,5,2) reads the fifth row of the range; if the range starts at A3, that is worksheet row 7.