How to Use the CHOOSEROWS Function to Extract Specific Rows from an Array in Excel

The Need for Surgical Data Extraction

When working with large datasets in Microsoft Excel, you frequently need to isolate specific rows of data for a presentation or a summary dashboard. For example, if you have a 100-row spreadsheet containing the monthly sales data for 100 different employees, your manager might ask you to build a mini-dashboard that only displays the data for the employees in Row 1, Row 15, and Row 50.

Historically, doing this required writing a complex INDEX formula and dragging it across the grid, or manually copying and pasting the rows (which breaks the moment the source data updates). To solve this, Excel introduced the CHOOSEROWS dynamic array function.

This function allows you to specify a source array and instantly extract a completely new, live-updating table containing only the exact row numbers you request.

Understanding the Syntax

The syntax for CHOOSEROWS is incredibly straightforward:

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

  • array: The master range of data you want to extract from (e.g., A1:D100).
  • row_num1: The index number of the first row you want to extract. (Note: This is the row number relative to the array, not the absolute Excel row number. If your array is B10:D20, row 1 of the array is Excel’s row 10).
  • row_num2 (Optional): Additional row numbers you want to extract, separated by commas.

Example 1: Extracting Specific Non-Contiguous Rows

Assume you have a master table of products in cells A2:E100. You want to build a quick summary that only pulls the data from the 5th, 10th, and 20th rows of that table.

Click on an empty cell where you want your new table to begin and type:

=CHOOSEROWS(A2:E100, 5, 10, 20)

When you press Enter, Excel will instantly “spill” a brand new 3-row, 5-column table. It will contain only the data from those specific rows. Because this is a dynamic array, if the data in row 5 of the master table changes, your new summary table will update instantly.

Example 2: Reordering Rows on the Fly

The CHOOSEROWS function extracts data in the exact order you type the numbers in the formula. This means you can use it to instantly flip or completely reorganize the layout of a table without sorting the original data.

If you want to pull the 10th row, followed by the 2nd row, followed by the 1st row, simply type them in that order:

=CHOOSEROWS(A2:E100, 10, 2, 1)

The resulting array will place row 10 at the top, and row 1 at the bottom.

Example 3: Extracting Data from the Bottom (Negative Numbers)

One of the most powerful features of the CHOOSEROWS function is its support for negative indexing. In Excel, a negative number tells the function to start counting from the absolute bottom of the array, rather than the top.

If you have a massive dataset of daily stock prices that updates every single day, the newest data is always added to the very bottom row. If you want to build a dashboard that always displays yesterday’s closing price, finding the exact row number is impossible because it changes every day.

By using a negative number, you can tell Excel to simply pull the very last row of the dataset, regardless of how long the dataset grows:

=CHOOSEROWS(A2:E5000, -1)

To extract the bottom three rows, you would use:

=CHOOSEROWS(A2:E5000, -3, -2, -1)

This guarantees your dashboard always displays the most recent data without ever requiring a formula update.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.