ROWS
The ROWS function returns the number of rows in a specified array or range.
The number of rows in a range can be important for analyzing data and creating dynamic formulas.
Syntax
ROWS(array)
| Argument | Description | Permitted values |
|---|---|---|
| array | Range of cells or array of values for which the number of rows needs to be determined | Any range or array of cells |
Examples of use
Counting the number of rows in a range
=ROWS(A1:A10)
This formula returns the number of rows in the range A1:A10.
Result: 10.
Counting the number of rows in the workspace
=ROWS($A:$A)
Result: the number of rows in the workspace.
Counting rows using a named range
If you have created a named range, for example, “MyRange”, you can use it in a function:
=ROWS(MyRange)
The result will depend on the size of the named range.