CHOOSEROWS Function

Excel Functions › Lookup & Reference

Excel 365 / 2024+ Dynamic Array

The Excel CHOOSEROWS function returns just the rows you ask for from a range or array — by position, in any order. Its superpower is negative numbers, which count from the bottom: -1 is always the newest entry of a growing log, no matter how long it gets. Available in Excel 365 and Excel 2024+.


Quick answer: to grab the last row of a shipment log — the most recent entry:
=CHOOSEROWS(A2:C6, -1)
The row spills as a 1-row array. =CHOOSEROWS(A2:C6, 1, 2) returns the first two rows instead.

Syntax

=CHOOSEROWS(array, row_num1, [row_num2], …)
ArgumentDescription
arrayRequiredThe range or array to take rows from.
row_num1RequiredThe first row to return. 1 = top row of the array; negative numbers count from the bottom (-1 = last row).
row_num2, …OptionalMore rows, in the order you want them back. Repeats are allowed.

Available in: Excel for Microsoft 365, Excel 2024+, and Excel for the web. Older versions show #NAME?. The column-wise twin is CHOOSECOLS.

First, last, and specific rows

The shipment log below sits in A1:C6, newest entry at the bottom. The highlighted row is what -1 returns:

ABC
1DateCarrierPackages
2Jun 2FastShip42
3Jun 3Redline38
4Jun 4FastShip51
5Jun 5Polar29
6Jun 6Redline47
=CHOOSEROWS(A2:C6, -1) // latest shipment: Jun 6, Redline, 47

Positive numbers count from the top, and you can mix several picks in one call:

=CHOOSEROWS(A2:C6, 1, 3) // rows 1 and 3 of the log
=CHOOSEROWS(A2:C6, -2, -1) // the last two rows - a rolling snapshot

Because the picks are positions, not addresses, the formulas keep working as the log grows — point the array at a whole Table column set and -1 always finds the newest row.

Try it: interactive CHOOSEROWS demo

Live demo

Pick rows from the shipment log above — watch how negative numbers walk up from the bottom.

The power move: top-N lists with SORT

CHOOSEROWS turns "sort the data" into "show me the leaders." SORT arranges the rows; CHOOSEROWS keeps the top three:

=CHOOSEROWS(SORT(A2:C6, 3, -1), 1, 2, 3) // top 3 by Packages, descending

It also pairs with SEQUENCE when the row list is itself computed — the last n rows of a log, where n lives in a cell:

=CHOOSEROWS(A2:C6, SEQUENCE(E1, 1, -E1)) // E1=3 -> rows -3, -2, -1

Where it sits among its siblings:

FunctionPicks rows byTypical job
CHOOSEROWSPosition (1, -1, …)First/last/nth rows, top-N after a SORT
FILTERCriteria (Region="West")All rows matching a condition
TAKE / DROPA count from either end"First 5 rows" / "all but the header"

Errors & common pitfalls

#VALUE! — row number out of range. Asking for row 6 (or -6) of a five-row array, or using 0, returns #VALUE!. Numbers must be between 1 and the row count, or -1 to minus the row count.

#SPILL! — the landing zone isn’t empty. The result spills as many columns wide as the source array. Clear the blocking cells or move the formula.

#NAME? — older Excel. CHOOSEROWS needs Excel 365 or Excel 2024+. In older versions, use INDEX with a row-number array constant.

Pitfall: include the header or not? If your array includes the header row, row 1 is the header. Start the array at the first data row (A2, not A1) when you mean "first record."

Pitfall: blank rows at the bottom count too. If the array includes empty rows, -1 returns zeros from the last blank row. Trim the reference first — in Excel 365, TRIMRANGE does exactly that.

Practice workbook

📊
Download the free CHOOSEROWS practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What do negative row numbers do in CHOOSEROWS?
They count from the bottom of the array: -1 is the last row, -2 the second-to-last. =CHOOSEROWS(log, -1) always returns the newest entry of a growing log.
Which Excel versions have CHOOSEROWS?
Excel for Microsoft 365, Excel for the web, and the perpetual Excel 2024 or later. Older versions show #NAME?; the fallback there is INDEX with an array of row numbers.
How do I get the last row of a table that keeps growing?
Point CHOOSEROWS at the table and use -1: =CHOOSEROWS(Orders, -1) with an Excel Table, so the reference expands automatically and -1 always lands on the newest row.
What's the difference between CHOOSEROWS and FILTER?
CHOOSEROWS picks rows by position (3rd, last, top two); FILTER picks rows by criteria (Region = "West"). For "top 3 by sales," sort first, then CHOOSEROWS the leaders.
CHOOSEROWS vs TAKE — which should I use?
TAKE grabs a contiguous block from either end (TAKE(data, -3) = last three rows) with one argument. CHOOSEROWS picks arbitrary rows in arbitrary order, including repeats. For a simple head or tail, TAKE is shorter; for anything cherry-picked, CHOOSEROWS.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: CHOOSECOLS · FILTER · SORT · CHOOSE · TRIMRANGE