# INDEX in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/index/

INDEX reads one cell, a row or a column from a range by position. Paired with MATCH it replaces VLOOKUP and can look in any direction.

## Syntax

```
INDEX(reference, [row], [column])
```

## Arguments

- `reference` (range, required: yes): The range to read from. Row and column numbers count inside it.
- `row` (number, required: no): Row position inside reference, from 1. 0 or omitted returns whole columns.
- `column` (number, required: no): Column position inside reference, from 1. 0 or omitted returns whole rows.

## Examples

The examples use this table, starting in A1:

| Product | Price | Stock |
|---|---|---|
| Lamp | 80 | 12 |
| Chair | 549 | 0 |
| Stand | 130 | 7 |
| Tray | 34 | 40 |

```
=INDEX(A2:C5, 3, 2)
```

Result: `130`

Third row, second column of the block: the price of Stand. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=INDEX(B2:B5, 2)
```

Result: `549`

With a single column the row number is enough. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=INDEX(A2:A5, MATCH(34, B2:B5, 0))
```

Result: `Tray`

MATCH finds the row of price 34, INDEX returns the product from that row. This also looks left, which VLOOKUP cannot do. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=INDEX(A2:C5, 0, 2)
```

Result: 

| 80 |
|---|
| 549 |
| 130 |
| 34 |

Row 0 means every row: the whole second column comes back as an array. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=INDEX(A2:C5, 2, 0)
```

Result: 

| Chair | 549 | 0 |
|---|---|---|


Column 0 means every column: the whole second row spills across. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- A row or column number outside the range returns #NUM!, for example row 5 on a four-row range.
- INDEX counts from the first cell of reference, not from the sheet. In B2:B5, row 1 is B2.
- When MATCH cannot find the key, the whole INDEX/MATCH formula returns #N/A. Use 0 as MATCH's last argument for an exact match, and wrap in IFERROR.
- Row 0 or column 0 returns a whole column or row as an array, which spills and needs empty cells.

## Compared with Excel

Same syntax as Excel INDEX for a single range. Excel's extra area_num argument for several areas is not in Sheets.

## Questions and answers

### Why use INDEX and MATCH instead of VLOOKUP?

The key column can be anywhere, including right of the result, and inserting columns does not shift a hard-coded index number.

## Related functions

- [MATCH](https://goingstellar.ro/reference/sheets/match/)
- [VLOOKUP](https://goingstellar.ro/reference/sheets/vlookup/)
- [XLOOKUP](https://goingstellar.ro/reference/sheets/xlookup/)
- [OFFSET](https://goingstellar.ro/reference/sheets/offset/)
- [INDIRECT](https://goingstellar.ro/reference/sheets/indirect/)

## Sources

- [INDEX (Docs Editors Help)](https://support.google.com/docs/answer/3098242)

