# INDEX (array) function

Returns a value of an element in a table or an arrayA set of data used to build single formulas that produce multiple results or that operate on a group of arguments arranged in rows and columns. Excel has two kinds of arrays: array ranges and array constants. An array range is a rectangular area of cells that share a common formula; an array constant is a specially arranged group of constants that's used as an argument in a formula., selected by the row and column number indexes.

The INDEX function has two syntax forms: array and reference. The array form always returns a value or an array of values; the reference form always returns a reference. Use the array form if the first argument to INDEX is an array constant. This topic describes the array syntax form. For information on the the reference form, see INDEX (reference) function.

## Syntax

INDEX(array,row_num,column_num)

Argument

Description

Remarks

array

A range of cells or an array constant.

• If array contains only one row or column, the corresponding row_num or column_num argument is optional.

• If array has more than one row and more than one column, and only row_num or column_num is used, INDEX returns an array of the entire row or column in array.

row_num

Selects the row in array from which to return a value.

• If row_num is omitted, column_num is required.

• This argument must point to a cell within array; otherwise, this function returns the #REF! error value.

column_num

Selects the column in array from which to return a value.

• If column_num is omitted, row_num is required.

• This argument must point to a cell within array; otherwise, this function returns the #REF! error value.

## General remarks

• If both the row_num and column_num arguments are used, INDEX returns the value in the cell at the intersection of row_num and column_num.

• If you set row_num or column_num to 0 (zero), INDEX returns the array of values for the entire column or row, respectively. To use values returned as an array, enter the INDEX function as an array formula in a horizontal range of cells for a row, and in a vertical range of cells for a column. To enter an array formula, press +RETURN.

## Example 2: Return a value from an array

 Rate this content: