Returns one or more elements from a range of cells or an array.
Syntax #1:
INDEX( data:Range or Array, column:Integer, row:Integer )
Returns the element of the data range of cells (or array) specified by the column,row parameters.
Column and row numbers start at 1.
Example:
INDEX(B1:D20, 2, 3)
returns C3
.
Syntax #2:
INDEX( data:Range or Array, column:Integer, row:Integer, columns:Integer, rows:Integer )
With five parameters this function returns a sub-array of the data range of cells (or array) starting at the position column,row with columns columns and rows rows.
Example:
INDEX(B1:D20, 2, 3, 2, 5)
returns C3:D7
as an array.
Revisions:
Starting with 2.00, this function will accept zero for the column and/or row number.
If the column number is zero, the whole of the specified row(s) is returned.
If the row number is zero, the whole of the specified column(s) is returned.
Starting with 2.00, this function will accept zero for the optional number of columns and/or rows.
If the number of columns is zero, the rest of the specified row(s) beginning at the given column number is returned.
If the number of rows is zero, the whole of the specified column(s) beginning at the given row number is returned.