Rows of a range
| A | |
|---|---|
| 1 |
Formula: C2: =ROWS(A2:A10)
Result: 9
A2 to A10 contains nine rows.
ROWS with worked examples you can test in the live grid. The argument details are in the Excel guide.
The arguments and common errors are covered in the ROWS Excel guide; check the function help in Google Sheets for its own argument list.
| A | |
|---|---|
| 1 |
Formula: C2: =ROWS(A2:A10)
Result: 9
A2 to A10 contains nine rows.
| A | |
|---|---|
| 1 |
Formula: C2: =ROWS(B3:D8)
Result: 6
Only the height matters, so three columns still give six rows.
| A | B | |
|---|---|---|
| 1 | Rep | Amount |
| 2 | Ana | 1200 |
| 3 | Ben | 850 |
| 4 | Cara | 430 |
| 5 | Dan | 970 |
Formula: D2: =ROWS(FILTER(A2:A5,B2:B5>900))
Result: 2
Two amounts exceed 900, so the filtered list is two rows tall.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =ROWS(A2:A6)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | Item | Price | Stock | Result | |
| 2 | 101 | Pen | 2.5 | 120 | 5 | |
| 3 | 102 | Notebook | 4 | 80 | ||
| 4 | 103 | Lamp | 25 | 15 | ||
| 5 | 104 | Mug | 7.5 | 40 | ||
| 6 | 105 | Backpack | 39 | 12 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page