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





An array, an array formula, or a reference of a range of cells.


Basic Scenario

formula returns 5 for the count of rows between rows 4 and 8.

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.






 Download Workbook


  • Use the ROW function if you need the number of row of a reference.
  • To get the count of columns of an array or range, use the COLUMNS function.