Documentation/Calc Functions/ROWS

Function name:
ROWS

Category:
Spreadsheet

Summary:
Determines the number of rows in the given reference to a single cell or to a range of cells.

Syntax:
ROWS(Array)

Returns:
Returns an integer in the range 0 to 1,048,576 (inclusive) which is the count of the rows in the cell(s) specified in the argument.


 * If the Array argument is omitted, then ROWS returns 0.
 * If the Array argument refers to a single cell, then ROWS returns 1.
 * If the Array argument refers to a rectangular cell range, then ROWS returns the number of rows in the range.

Arguments:
Array is a specific cell reference (for example, "$Sheet1.A1"), a specific cell range (for example, "$Sheet1.$C$28:$H$29"), the name of a named or database range, or a constant array (for example, "{1, 3, 5, 7}").


 * If Array is omitted, the value 0 is returned.
 * If Array is not a valid reference to a single cell or a single rectangular cell range, then ROWS reports a parameter list error (Err:504). ROWS does not process references that comprise multiple cell ranges.

Additional details:

 * ROWS counts rows that have been hidden.
 * The value returned by ROWS is not dependent on the contents of the cells in a referenced cell area.

Related LibreOffice functions:
COLUMNS

ROW

ODF standard:
Section 6.13.30, part 2

Equivalent Excel functions:
ROWS