Exceljet

Quick, clean, and to the point

Excel ROWS Function

Excel ROWS function
Summary 

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 rows.

Purpose 
Get the number of rows in an array or reference.
Return value 
Number of rows
Syntax 
=ROWS (array)
Arguments 
  • array - A reference to a cell or range of cells.
Usage notes 

Use the ROWS function to get the row count for a given reference or range. For example, there are 10 rows in the range A1:A10, so:

=ROWS(A1:A10) // returns 10

The range B1:D5 contains 5 rows:

=ROWS(B1:D5) // returns 5

You can also use the ROWS function to get a row count for an array constant:

=ROWS({1;2;3}) // returns 3

Notes

  • Array can be a range or a reference to a single contiguous group of cells.
  • Array can be an array constant or an array created by another formula.