FormulaCraft

ROWS

ROWS returns the total number of rows contained in a range or array. It is useful for dynamic range calculations, validating how large a dataset is, or using inside formulas that need to know the height of a range such as INDEX or OFFSET.

Excel
=ROWS(A2:A5)
Google Sheets
=ROWS(A2:A5)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Product
Widget
Gadget
Doohickey
Thingamajig

=ROWS(A2:A5)4

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1A2:A5 is the range whose row count you want.
  2. 2ROWS counts every row in that range regardless of whether cells are empty.
  3. 3The result is 4 because A2:A5 spans four rows.

Need a version for your data?

Try: “Count how many rows are in my data range

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: