INDEX Function in Excel: Complete Tutorial with Examples

INDEX retrieves values by position, works with any direction, combines powerfully with MATCH, and outperforms VLOOKUP for flexible lookups.

Need to retrieve a value from a specific row and column? INDEX returns the value at a given position in a range, making it perfect for lookups, data retrieval, and building dynamic formulas. It’s faster and more flexible than VLOOKUP.

What Makes INDEX Useful

INDEX retrieves data precisely:

  • Position-based lookup – Get values by row and column numbers
  • No column counting – Reference any column without restrictions
  • Look left or right – No directional limitations like VLOOKUP
  • Formula foundation – Essential for INDEX-MATCH combinations
  • Array versatility – Return entire rows or columns
The Syntax
=INDEX(array, row_num, [column_num])

Array is your data range. Row_num is which row. Column_num is which column (optional if single column).


Example 1: Basic Value Retrieval

Get the value from row 3, column 2:

Formula: =INDEX(A1:C4, 3, 2)

Result: $800

Row 3 is Keyboard, column 2 is Price. INDEX returns the value at that intersection.


Example 2: Single Column Lookup

Get the 2nd value from a single column:

Formula: =INDEX(A2:A5, 2)

Result: $6,200

With a single column, you only need the row number. Column_num is optional.


Example 3: Extract Entire Row

Return all values from a specific row:

Formula: =INDEX(A1:E2, 2, 0)

Result: Returns the entire Expenses row

Using 0 for column_num returns all columns from that row.


Example 4: Extract Entire Column

Return all values from a specific column:

Formula: =INDEX(A2:C4, 0, 2)

Result: Returns all prices ($4,500, $250, $800)

Using 0 for row_num returns all rows from that column.


Example 5: Dynamic Cell Reference

Use INDEX to create dynamic cell references:

Cell D1: 2 (user input)

Formula: =INDEX(B2:B4, D1)

Result: $14,200

Change D1 to 3, and the result updates to $13,800.


Example 6: Last Value in a Range

Get the last value without knowing the exact position:

Formula: =INDEX(A2:A6, COUNTA(A2:A6))

Result: $6,900

COUNTA counts filled cells, INDEX uses that as the row number.


INDEX with MATCH (Powerful Combination)

INDEX alone needs row/column numbers. Combined with MATCH, you can look up by value:

Find price for “Keyboard”:

=INDEX(B2:B4, MATCH("Keyboard", A2:A4, 0))

Result: $800

MATCH finds the row number, INDEX retrieves the value.

Two-Dimensional Lookup

Look up both row and column by value:

Find Product B’s Q3 sales:

=INDEX(B2:E3, MATCH("Product B", A2:A3, 0), MATCH("Q3", B1:E1, 0))

Result: $112K

Two MATCH functions find the row and column positions.

INDEX Advantages Over VLOOKUP
Common Patterns

Return first match:

=INDEX(B:B, MATCH("value", A:A, 0))

Return last match:

=INDEX(B:B, SUMPRODUCT(MAX((A:A="value")*ROW(A:A))))

Multiple criteria:

=INDEX(C:C, MATCH(1, (A:A="value1")*(B:B="value2"), 0))

(Enter as array formula with Ctrl+Shift+Enter in older Excel)

Common Mistakes to Avoid

Wrong Array Size

  • Array must include all data you need
  • Don’t reference just the result column
  • Include lookup column for INDEX-MATCH

Zero for Row or Column

  • Use 0 to return entire row or column
  • Not the same as omitting the argument
  • Returns array, not single value

Row/Column Numbers vs Position

  • INDEX uses position within array, not worksheet row numbers
  • Position 1 = first item in your array
  • Not the same as row 1 of the spreadsheet
Error Handling

Check if row exists:

=IFERROR(INDEX(B:B, MATCH("value", A:A, 0)), "Not found")

Validate row number:

=IF(D1<=COUNTA(A:A), INDEX(B:B, D1), "Invalid row")
Tips for Using INDEX

Dynamic ranges: Combine with COUNTA or other functions for flexible ranges.

Replace VLOOKUP: INDEX-MATCH is more powerful and flexible than VLOOKUP.

Named ranges: Use named ranges with INDEX for clearer formulas.

Spill ranges: In Excel 365, INDEX can return dynamic arrays automatically.

When to Use INDEX

Use INDEX when:

  • You know the exact row/column position
  • Building INDEX-MATCH lookups
  • Need to look left
  • Want better performance than VLOOKUP
  • Creating dynamic formulas

Don’t use INDEX when:

  • Simple single-criteria lookup (VLOOKUP might be simpler)
  • You need conditional retrieval (use FILTER in Excel 365)
Start Using It

Open a spreadsheet with data. Pick a specific row and column intersection. Type =INDEX, specify your range and position numbers. See the exact value returned.

INDEX becomes powerful when combined with MATCH for flexible lookups.


Questions about INDEX? Want to master INDEX-MATCH combinations? Let’s connect.