Lookup & reference function

CHOOSEROWS function

Returns only the rows you ask for from a range or array, by position, in the order you list them.

Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024+

Excel 2024 and laterWorks in Google Sheets

Syntax

CHOOSEROWS(array, row_num1, [row_num2], ...)
ArgumentWhat it means
arrayRequiredThe range or array to take rows from.
row_num1RequiredThe position of the first row to return. Negative numbers count from the bottom (-1 is the last row).
row_num2, ...OptionalMore row positions, in any order. An array such as SEQUENCE(3) also works.

Returns: An array of the chosen rows, which spills.

How CHOOSEROWS works

CHOOSEROWS pulls specific rows out of a list by their position: the 1st and 3rd months, the last entry, or every row number produced by another formula. It is the row counterpart of CHOOSECOLS.

Positions are counted inside the range, starting at 1, and negative numbers count from the end, so -1 always means the latest row however long the list becomes. You can pass several numbers or an array of numbers, for instance from SEQUENCE or XMATCH. For a simple "first n" or "last n" slice, TAKE is shorter.

Examples

1Pick specific rows

D2fx=CHOOSEROWS(A2:B7, 1, 3)
ABCDE
1MonthSales
2Jan8200Jan8200
3Feb9150Mar10400
4Mar10400
5Apr9800
6May11250
7Jun12030

Rows 1 and 3 of the range are January and March.

2Always the latest row

D2fx=CHOOSEROWS(A2:B7, -1)
ABCDE
1MonthSales
2Jan8200Jun12030
3Feb9150
4Mar10400
5Apr9800
6May11250
7Jun12030

-1 counts from the bottom, so the most recent month is returned even when new months are added to a table.

3Last two rows, newest first

D2fx=CHOOSEROWS(A2:B7, -1, -2)
ABCDE
1MonthSales
2Jan8200Jun12030
3Feb9150May11250
4Mar10400
5Apr9800
6May11250
7Jun12030

Listing -1 before -2 returns June then May, reversing their order.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!A row number is 0 or beyond the number of rows in array.Use positions within the size of the array.

Tips

  • =CHOOSEROWS(A2:B7, SEQUENCE(3, 1, 1, 2)) returns rows 1, 3 and 5 - every other row.
  • To drop rows instead of keeping them, use DROP.

Google Sheets

CHOOSEROWS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

CHOOSEROWS in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechZVOLITŘÁDKY
DanishVÆLGRÆKKER
DutchKIES.RIJEN
FinnishVALITSERIVIT
FrenchCHOISIRLIGNES
GermanZEILENWAHL
HungarianSORVÁLASZTÁS
ItalianSCEGLI.RIGA
Norwegian (Bokmål)VELGRADER
PolishWYBIERZ.WIERSZE
Portuguese (Brazil)ESCOLHERLINS
RussianВЫБОРСТРОК
SpanishELEGIRFILAS
SwedishVÄLJRADER
TurkishSATIRSEÇ

Recipes that use CHOOSEROWS