ROWS Function (Gnumeric)
Learn the ROWS function in Gnumeric: Returns the number of rows in a reference or array.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
ROWS reports the number of rows spanned by a reference or array. It is a structural count: empty cells still occupy rows inside the boundaries. Use it to check table height, create a relative sequence or measure available positions in a rectangular block.
Syntax and meaning
=ROWS(reference)
reference is one required array, reference or range. A rectangular range includes its first and last row, so height is last row minus first row plus one. Column count does not affect that height.
ROWS(A1:C5) is 5, ROWS(B2:E2) is 1, and ROWS(B2:B9) is 8. ROW answers a different question: worksheet position. A range beginning on worksheet row 20 can still be only three rows tall.
Retained example
Enter the original practice data in A1:C5 as shown. The table headings below identify worksheet columns; do not insert them as a separate header row. Row 1 contains 1, 10 and apple.
| Row | A (Quantity) | B (Amount) | C (Category) |
|---|---|---|---|
| 1 | 1 | 10 | apple |
| 2 | 2 | 20 | pear |
| 3 | 3 | 30 | apple |
| 4 | 4 | 40 | pear |
| 5 | 5 | 50 | apple |
=ROWS(A1:C5)
The expected result is 5. Multiplying by COLUMNS(A1:C5) gives total rectangular capacity, 5*3=15 cell positions. Clearing A3:C3 does not change the five-row boundary.
Counting populated records needs a separate definition of what makes a record present. ROWS does not distinguish a complete observation from an empty row or duplicate record.
Worked range maintenance
Suppose B2:D6 reserves five observation slots. =ROWS(B2:D6) gives 5. Changing the formula to B2:D7 gives 6, even if B7:D7 is blank.
This checks how much area a formula covers, not whether each observation is complete or unique. Inspect record identities and missing values separately. A correct geometric height can coexist with missing or duplicated data.
Advanced use: expanding counter
Enter =ROWS($B$2:B2) in E2 and fill down to E4. The later formulas become =ROWS($B$2:B3) and =ROWS($B$2:B4), giving 1, 2 and 3.
The fixed first endpoint anchors the sequence at B2; the relative second endpoint expands downward. Fixing both endpoints makes every copied formula return the same height. This pattern counts position relative to a table origin rather than exposing absolute worksheet row numbers.
For five slots B2:B6 containing 10, 20, 30, 40 and 50, =SUM(B2:B6)/ROWS(B2:B6) gives 30. The denominator deliberately counts five positions. A blank slot still counts, so this does not generally equal an average that ignores unavailable numeric observations.
Troubleshooting and scope
An extra row often indicates that the reference includes a heading or total. Decide whether that row belongs in the count. A heading placed in row 1 does not automatically disappear from ROWS(A1:C5).
Supply an actual reference or array rather than relying on conversion of arbitrary text or scalar values. For a wrong copied sequence, inspect the dollar signs and where filling began. For moved records, check the current reference boundaries and which records they contain.
These examples cover contiguous same-sheet ranges. They do not certify multi-area or external-workbook behavior. Counting only visible filtered records is a different requirement from measuring a stored reference’s geometric height.
Availability and verification
Version coverage: Gnumeric 1.12.57 has the scoped checks below. The 1.12.62 evidence is a documentation/source check dated October 14, 2026.
- Introduced: Gnumeric 0.19, documented in the official release history. This is a historical introduction record; the native controls below use 1.12.57.
- Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
- Scope: Desktop; the fn-lookup function module must be included and enabled.
- Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.
The executable contract is also present in the official Gnumeric 1.12.57 fn-lookup source. The saved source was originally retrieved on October 17, 2026 and re-inspected for this guide. The last functioning release is not established; support in a named version is not a retirement claim.
On October 17, 2026, Gnumeric ssconvert 1.12.57 recalculated a synthetic workbook in the C.UTF-8 locale. Scoped controls: =ROWS(A1:C5) → 5; =ROWS(B2:E2) → 1; =ROWS(B2:B9) → 8; =ROWS($B$2:B2) → 1; =ROWS($B$2:B4) → 3. These are native calculation-engine results, not GUI tests or screenshots. Other tutorial layouts and displayed outputs are independent expectations unless covered by these exact formulas. Input/output files, preserved formulas, raw values and hashes were retained. The XLSX importer logged an unused workbookProtection-element warning; changed-input controls and recorded results were checked.