The Excel ROWS function returns the count of rows in a given reference. For example, ROWS(A1:A3) returns 3, since the range A1:A3 contains 3 columns.
Syntax
The syntax for the ROWS function in Microsoft Excel is:
=ROWS ( reference )
reference
A reference to a range of cells or an array.
Rows Function Examples
The following spreadsheet shows three simple examples of the Excel Rows function.
Formulas:
Results:
Note that the above functions were calculated in Excel 2010. Therefore, the formula in cell A3 (which returns the number of rows in the whole of column B of the spreadsheet) returns the value 1,048,576, as this is the number of rows in Excel 2010. If this example were run in Excel 2003, it would return the number 65,536.