Syntax
| Parameter | Description |
|---|---|
| array | Parameter of the ROWS function. |
Examples
Count rows in range
=ROWS(A1:A10)
Count filtered results
=ROWS(FILTER(A1:A100, B1:B100>50))
Last row of dynamic range
=INDEX(A:A, ROWS(A1:A100))
Common Errors
Occurs if the argument is not a valid reference or array.
Can occur when wrapping a FILTER that returns no results (empty array) — use the if_empty argument in FILTER to prevent this.
Tips
ROWS counts total rows in the range (including blanks). COUNTA counts non-empty cells. Use ROWS for range dimensions, COUNTA for data count.
ROWS(UNIQUE(A1:A100)) tells you how many unique values exist. Combine with other dynamic array functions to measure their output.
ROWS works on both cell ranges and in-memory arrays like {1,2,3;4,5,6} (returns 2 for this 2-row array).
Try ROWS in Viztab
Import your data and use ROWS with 370+ other formulas. No signup required.
Open Viztab