# CHOOSEROWS formula generator

> Describe what you need and get a CHOOSEROWS formula for Excel and Google Sheets, run on real data before you copy it. Plus 7 tested CHOOSEROWS examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/chooserows · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

CHOOSEROWS returns the rows you name from a range or array: 1 is the first row and -1 the last, so CHOOSEROWS(range,-1) always gives the latest entry.

Describe the task at [CHOOSEROWS formula generator](https://spreadsheetpractice.com/tools/formula-generator/chooserows) and get a CHOOSEROWS formula for Excel and Google Sheets, tested on real data.

## Tested CHOOSEROWS examples

### Use INDEX to return a value by row and column number

`=INDEX(B2:F6,I1,K1)`

Excel. Result on the sample sheet: Eli. [See it and try it](https://spreadsheetpractice.com/formulas/index-by-row-and-column-number)

### Show the last 5 entries in a list

`=TAKE(FILTER(A2:C20,A2:A20<>""),-G1)`

Excel. Result on the sample sheet: 5 rows (F3:H7). [See it and try it](https://spreadsheetpractice.com/formulas/show-the-last-n-entries-in-a-list)

### Get the last value in a column

`=CHOOSEROWS(FILTER(B2:B,B2:B<>""),-1)`

Google Sheets. Result on the sample sheet: 80.9. [See it and try it](https://spreadsheetpractice.com/formulas/get-the-last-value-in-a-column)

### Find the nth match

`=INDEX(FILTER(A2:A10,B2:B10=F1),H1)`

Excel. Result on the sample sheet: 4/17/2026. [See it and try it](https://spreadsheetpractice.com/formulas/find-nth-match)

### Get the second to last value in a column

`=CHOOSEROWS(FILTER(B2:B11,B2:B11<>""),-2)`

Excel. Result on the sample sheet: $3.35. [See it and try it](https://spreadsheetpractice.com/formulas/second-to-last-value-in-column)

### Sum the last N values in a column

`=SUM(TAKE(FILTER(B2:B13,B2:B13<>""),-E1))`

Excel. Result on the sample sheet: 1546. [See it and try it](https://spreadsheetpractice.com/formulas/sum-the-last-n-values)

### Average the last N values

`=AVERAGE(TAKE(FILTER(B2:B11,B2:B11<>""),-E1))`

Excel. Result on the sample sheet: 86.00. [See it and try it](https://spreadsheetpractice.com/formulas/average-the-last-n-values)

## Questions

### What does the CHOOSEROWS formula generator do?

You describe the task in plain English, and it writes the formula, using CHOOSEROWS where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does CHOOSEROWS do?

CHOOSEROWS returns the rows you name from a range or array: 1 is the first row and -1 the last, so CHOOSEROWS(range,-1) always gives the latest entry.

### Can I learn to write CHOOSEROWS formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the CHOOSEROWS function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
