ROWS

The ROWS function returns the number of rows included in a specified collection of cells.

ROWS(range, headers)

range: A collection of cells. range must contain a reference to a single range of cells, which may contain any values.

headers: An optional modal value specifying whether to include header and footer rows in the count of rows.

include-headers (0 or omitted): Include header and footer rows in the count of rows.

exclude-headers (1): Exclude header and footer rows from the count of rows.

Notes

Examples

=ROWS(A11:D20) returns 10, the number of rows from 11 through 20.

=ROWS(D) returns the total number of rows in column D.

=ROWS(A1:D5,0) returns 5, the number of rows from 1 through 5, including the header row 1.

=ROWS(A1:D5,1) returns 4, the number of rows from 1 through 5, excluding the header row 1.

See also
COLUMNS