# To count total rows in a range in Excel

If you need to count the number of rows in a range, use the ROWS function.

The ROWS counts the number of rows in the supplied range and returns that number as the result. See illustration below:

## Formula

=ROWS(range)

## Explanation

In the example, the active cell contains this formula:

=ROWS(B4:C9)