INDEX

Returns one or more elements from an array or range of cells.

Syntax #1:

INDEX(data:array|range, col:number, row:number)

Returns the element of the data array (or range of cells) specified by col,row.

Column and row indices start at 1.

Example:

INDEX(B1:D20, 2, 3)

returns C3.

Syntax #2:

INDEX(data:array|range, col:number, row:number, cols:number, rows:number)

With five parameters this function returns a sub-array of the data array (or range of cells)
starting at the position col,row with cols 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 column and/or row size.
If the column size is zero, the rest of the specified row(s) beginning at the given column number is returned.
If the row size is zero, the whole of the specified column(s) beginning at the given row number is returned.