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], ...)| Argument | What it means | |
|---|---|---|
array | Required | The range or array to take rows from. |
row_num1 | Required | The position of the first row to return. Negative numbers count from the bottom (-1 is the last row). |
row_num2, ... | Optional | More 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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Sales | |||
| 2 | Jan | 8200 | Jan | 8200 | |
| 3 | Feb | 9150 | Mar | 10400 | |
| 4 | Mar | 10400 | |||
| 5 | Apr | 9800 | |||
| 6 | May | 11250 | |||
| 7 | Jun | 12030 |
Rows 1 and 3 of the range are January and March.
2Always the latest row
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Sales | |||
| 2 | Jan | 8200 | Jun | 12030 | |
| 3 | Feb | 9150 | |||
| 4 | Mar | 10400 | |||
| 5 | Apr | 9800 | |||
| 6 | May | 11250 | |||
| 7 | Jun | 12030 |
-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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Sales | |||
| 2 | Jan | 8200 | Jun | 12030 | |
| 3 | Feb | 9150 | May | 11250 | |
| 4 | Mar | 10400 | |||
| 5 | Apr | 9800 | |||
| 6 | May | 11250 | |||
| 7 | Jun | 12030 |
Listing -1 before -2 returns June then May, reversing their order.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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.
| Language | Function name |
|---|---|
| Czech | ZVOLITŘÁDKY |
| Danish | VÆLGRÆKKER |
| Dutch | KIES.RIJEN |
| Finnish | VALITSERIVIT |
| French | CHOISIRLIGNES |
| German | ZEILENWAHL |
| Hungarian | SORVÁLASZTÁS |
| Italian | SCEGLI.RIGA |
| Norwegian (Bokmål) | VELGRADER |
| Polish | WYBIERZ.WIERSZE |
| Portuguese (Brazil) | ESCOLHERLINS |
| Russian | ВЫБОРСТРОК |
| Spanish | ELEGIRFILAS |
| Swedish | VÄLJRADER |
| Turkish | SATIRSEÇ |