Function Name: CHOOSEROWS

The CHOOSEROWS function in Excel allows you to select specific rows from an array or range. This function is useful for extracting and working with particular rows without manually copying and pasting data.

Syntax

=CHOOSEROWS(array,row_num1,[row_num2],…)

The CHOOSEROWS function syntax has the following arguments:

  • array    The array containing the columns to be returned in the new array. Required.

  • row_num1    The first row number to be returned. Required.

  • [row_num2]    Additional row numbers to be returned. Optional.

Purpose:

  • Data Analysis: Focus on specific rows that are relevant to your analysis.
  • Reporting: Create reports that dynamically update based on selected rows.
  • Data Cleaning: Extract and clean specific rows from a dataset.

Examples

Copy the example data in the following table and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.

Example 1

Returns an array of rows 1, 3, 5, and 1 again from the array in the range A2:B7.

Data

   

1

2

  

3

4

  

5

6

  

7

8

  

9

10

  

11

12

  

Formulas

   

=CHOOSEROWS(A2:B7,1,3,5,1)

Example 2

Returns an array of rows 1, 3, 5, and 1 again from the array in the range A2:B7 using array constants.

Data

   

1

2

  

3

4

  

5

6

  

7

8

  

9

10

  

11

12

  

Formulas

   

=CHOOSEROWS(A2:B7,{1,3},5,1)

 
Example 3

Returns an array of the last two rows from the array in the range A2:B7 in the order of row four and then row three.

Data

   

1

2

  

3

4

  

5

6

  

7

8

  

9

10

  

11

12

  

Formulas

 

 

 

=CHOOSEROWS(A2:B7,-1,-2)