Category: FUNCTION | Updated: 2026-11-22

How to Use the CHOOSEROWS Function in Google Sheets | Extract Specific Rows

What Is the CHOOSEROWS Function?

The CHOOSEROWS function extracts only the desired rows from a specified cell range or array by their row numbers. It is handy when you want to pull out only the header row and total row, or reorder specific rows.

Syntax

=CHOOSEROWS(array, row_num1, [row_num2, ...])
  • array: The source cell range or array from which to extract rows.
  • row_num1: The first row number to extract (where 1 is the top row of array). Negative numbers count backward from the end (-1 is the last row).
  • row_num2, … (optional): Additional row numbers to extract, separated by commas.

Practical Examples

This example extracts only row 1 (header) and row 5 (the last row, Total) from the sales table in A1:C5 into E1.

Row Col A (Month) Col B (Target) Col C (Actual) Formula in Col E Col E Col F Col G
1 Month Target Actual =CHOOSEROWS(A1:C5, 1, -1) Month Target Actual
2 Jan 100 110 (Auto-expanded) Total 300 320
3 Feb 100 95
4 Mar 100 115
5 Total 300 320

Common Errors and Precautions

  • #VALUE! error: Occurs if row_num is 0 or exceeds the total number of rows in array (for example, specifying 6 or -6 for a 5-row range).
  • Not sheet-wide row numbers: row_num is relative to the range specified in the first argument, not the sheet’s overall row number. For example, if array is A5:C10, specifying 1 extracts row 5 of the sheet.
  • #REF! error: Occurs if cells in the output expansion area already contain values. Keep the destination area empty.

Frequently Asked Questions

Q. How do I specify the 'last row (bottom row)' in CHOOSEROWS?

A. Pass a negative number (-1) as the row number. -1 extracts the last row, and -2 extracts the second-to-last row.

Q. Can I extract rows in a different order from the original table?

A. Yes. Writing '=CHOOSEROWS(A1:C5, 5, 1, 3)' outputs the rows from top to bottom in the exact order you specified.