INDEX function
Summary
Uses an index to choose a value from a reference or array
Syntax
INDEX(array, row_num, [column_num])
The array form of the INDEX function has the following arguments:
• array Required. 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.
• 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 Required, unless column_num is present. Selects the row in array from which to return a value. If row_num is omitted, column_num is required.
• column_num Optional. Selects the column in array from which to return a value. If column_num is omitted, row_num is required.
• array Required. 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.
• 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 Required, unless column_num is present. Selects the row in array from which to return a value. If row_num is omitted, column_num is required.
• column_num Optional. Selects the column in array from which to return a value. If column_num is omitted, row_num is required.
Example
=INDEX(A2:B3,2,2)
=INDEX(A2:B3,2,1)
=INDEX({1,2;3,4},0,2)
=INDEX(A2:B3,2,1)
=INDEX({1,2;3,4},0,2)