WorkbookLogic
FunctionLookup and referenceintermediateINDEXIF

INDEX Function

By WorkbookLogic

The Excel INDEX function returns the value or reference at a specified position within a range or array. Positions are counted relative to the selected array, not the worksheet.

ExcelLast reviewed Sep 11, 2026
index-function-v1.0.0.xlsx
Excel INDEX Function
Return a value from a table by specifying its row and column position inside a bounded array.
Source array, editableINDEX examples
ProductRegionPriceUnitsExampleRow numColumn numFormula syntaxResult
AtlasNorth1,20055First product11=INDEX(A12:D19,G12,H12)Atlas
BeaconSouth85040Third-row price33=INDEX(A12:D19,G13,H13)1450
CedarNorth1,45065Sixth-row units64=INDEX(A12:D19,G14,H14)70
DeltaWest00
EmberEast1,10050How to read the examples
FlintNorth76070Positions are counted from the top-left cell of the array.
GroveSouth1,32545Row and column numbers identify the intersection to return.
HarborWest-10010Changing the array boundaries changes what each position means.
Reliability checks
Row 1, column 1 returns AtlasOK
Row 3, column 3 returns the visible price 1,450OK

Overview

The Excel INDEX function retrieves a value by its relative location inside a selected range or array. It can return text, numbers, dates, formulas, or a reference that another function can use.

Quick reference

Syntax: =INDEX(array, row_num, [column_num])

Returns: The value or reference at the selected position. (any)

Arguments:

  • array (required) — The range or array containing the value to return.
  • row_num (required) — The one-based row position within array; zero can return an entire column in supported array contexts.
  • column_num (optional) — The one-based column position within array; omit for a one-column array, or use zero to return an entire row in supported array contexts.
  • area_num (optional) — In the reference form, selects which range to use when the first argument contains multiple areas.

The bracketed column_num argument may be omitted for a one-column array. In the reference form, optional area_num selects one range when several areas are supplied.

Common uses

  • Return a value from a known row and column position.
  • Combine with MATCH for a flexible exact-key lookup.
  • Build a two-way lookup using separate row and column matches.
  • Select one row or column for another array-aware calculation.

Calculations

INDEX treats the upper-left cell of array as row 1, column 1. It moves to the requested relative row and column and returns the content at that intersection. For a one-column array, only row_num is needed; for a one-row array, the column position can be selected with the appropriate syntax.

INDEX returns a reference internally, even though a normal worksheet formula displays the referenced cell's value. This makes it useful inside formulas that need a dynamic reference. Most formulas use the array form shown in the workbook. The less common reference form can accept multiple parenthesized ranges and use area_num to choose among them.

When a position should be determined from a key rather than entered manually, MATCH can calculate the row or column number. Setting row_num to zero returns an entire column, while setting column_num to zero returns an entire row in contexts that can accept array results.

Function behavior

Situation

Behavior

One-dimensional array

Only one position is normally required.

Two-dimensional array

Row and column numbers select the intersection.

Position outside array

Returns #REF!.

Changed array boundary

Changes the meaning of every relative position.

Zero row or column

Can return an entire column or row in an array-aware context.

Return type

Can return text, numbers, dates, logical values, errors, or references.

Blank selected cell

Returns zero in some direct-value contexts, depending on how the result is consumed and formatted.

Reference result

Can participate in reference operations and dynamic-range formulas.

Common errors

Counting from the worksheet edge

What happens:
The requested position points to the wrong cell or falls outside the array.

Better approach:
Count from the upper-left cell of the selected array, where row 1 and column 1 begin.

Including headers unintentionally

What happens:
Every intended data position is shifted by one.

Better approach:
Decide whether headers belong in array and count positions from the exact boundary supplied.

Hardcoding a changing position

What happens:
The formula keeps returning the same row even when the lookup item's position changes.

Better approach:
Use MATCH or XMATCH to calculate the required position dynamically.

Omitting column_num from a multi-column array

What happens:
The formula cannot identify one scalar intersection or returns an unintended array in modern Excel.

Better approach:
Provide both row and column positions when selecting one value from a two-dimensional array.

Example

Example 1 — Return the First Item

=INDEX(A12:D19,G12,H12)

With row 1 and column 1, the workbook returns the first Product, Atlas.

Example 2 — Return a Price

=INDEX(A12:D19,G13,H13)

Row 3, column 3 points to Cedar's Price and returns 1,450.

Example 3 — Return Units

=INDEX(A12:D19,G14,H14)

Row 6, column 4 returns the Units value 70.

Example workbook

The workbook contains an INDEX Example sheet with eight editable Product, Region, Price, and Units records. Three live formulas demonstrate text and numeric retrieval from visible row and column positions, while two checks reconcile the first product and third-row price. A Notes sheet explains array-relative indexing and bounded ranges.

Key takeaway

INDEX positions are relative to the selected array: define that boundary first, then supply the row and column that intersect at the required value.