The Excel ROWS function is a Lookup & Reference formula that returns the number of rows in an array, an array formula, or a range of cells. In this guide, we’re going to show you how to use the Excel ROWS function and also go over some tips and error handling methods.
Supported versions
- All Excel versions
Syntax
Arguments
array |
An array, an array formula, or a reference of a range of cells. |
Examples
Basic Scenario
Using with a formula
You can use the Excel ROWS function with an array or an array that returns a formula to make it dynamic. In our example, the OFFSET function returns an array values in the range B19:C23, which are used as the argument for the ROWS function.
Generating number series
An alternative way of using the ROWS function is generating a number series. You can use an expanding reference as an array argument. Expanding the range from $C$10:$C10 to $C$10:$C15 generates numbers from 1 to 6.
.
.
.
=ROWS($C$10:$C15)