This function creates a new array from the selected rows in the existing range.

Sample Usage

CHOOSEROWS(A2:B5, 1, 3, 1)

CHOOSEROWS(A2:B5, -1, -2, -3)

Syntax

CHOOSEROWS(array, row_num1, [row_num2])

  • array: The array that contains the rows to be returned.
  • row_num1: The row number of the first row to be returned.
  • row_num2…: [ OPTIONAL ] The row number(s) of additional row(s) to be returned.

Examples

Simple data extraction operation with CHOOSEROWS

Example data:

1StudentGrades
2Harry95
3Jenny85
4Lily76
5Sunny60

Example: Input this formula in D1: =CHOOSEROWS(A1:B5, 1, 2, 4, 2)

Result:

DE
1StudentGrade
2Harry95
3Lily76
4Harry95

Make a Copy

Simple data extraction with CHOOSEROWS selecting rows ranked from the bottom

Example data:

1StudentGrade
2Harry95
3Jenny85
4Lily76
5Sunny60

Example: Input this formula in D1: =CHOOSEROWS(A1:B5, 1, -1, -2, -3)

Result:

DE
1StudentGrade
2Sunny60
3Lily76
4Jenny85

Make a Copy