What is INDEX in Google Sheets?

When to use it

Use INDEX with MATCH for left lookups, two-way table intersections, or pulling the nth match from a sorted list.

When to skip it

Skip INDEX/MATCH when XLOOKUP covers the case in one function with clearer not-found handling.

How it works

  1. 1

    Pass the array or reference as the first argument.

  2. 2

    Supply row index and optional column index for two-dimensional ranges.

  3. 3

    Use MATCH to find row or column positions dynamically from keys.

  4. 4

    Use INDEX(range, 0, col) or INDEX(range, row, 0) to return whole row or column in some contexts.

  5. 5

    Lock lookup tables with absolute references when copying formulas.

  6. 6

    Verify row numbers after sorting or filtering does not scramble static INDEX positions.

Examples in Google Sheets

INDEX MATCH lookup

=INDEX(C:C, MATCH(E2, A:A, 0)) returns price from column C where column A matches E2.

Two-way table

=INDEX(B2:F20, MATCH(H1, A2:A20, 0), MATCH(H2, B1:F1, 0)) crosses row and column headers.

Nth item

=INDEX(SORT(UNIQUE(B2:B)), 3) returns the third distinct value after sort.

Better Sheets resources

Common mistakes

  • Hard-coded row numbers after inserting rows above the table.
  • MATCH third argument wrong for approximate vs exact match.
  • INDEX column number off by one after inserting a column left of return range.
  • Referencing whole columns A:A inside INDEX on huge sheets for no reason.
  • Ignoring #N/A from MATCH when key is missing without IFERROR.

Frequently asked questions

INDEX vs VLOOKUP?
INDEX with MATCH can look left and avoids VLOOKUP column index fragility.
INDEX vs XLOOKUP?
XLOOKUP simplifies many INDEX MATCH patterns with one function.
Return entire row?
Use row index with appropriate column index 0 form per Sheets rules for row slices.
INDEX with multiple MATCH?
Rare patterns need FILTER instead when multiple keys match.
Why #REF!?
Row or column index out of bounds of the array.
INDEX on spilled array?
Yes. INDEX can pick elements from dynamic array output.
INDEX two-dimensional?
Provide both row and column indexes for matrix ranges.

Related terms