Back to Functions

ROWS

Returns the number of rows in a specified array or range.

LookupROWS(range)

The ROWS function in Google Sheets returns the number of rows contained in a specified range or array. It's a handy building block for formulas that need to know the size of a data set dynamically, such as when working with OFFSET, INDEX, or dynamic ranges. Dive into our comprehensive guide to master its application.

Parameters

  • range: The range or array for which you want to count the number of rows.

Step-by-Step Tutorial

  1. Counting rows in a range:

    • Example: =ROWS(A1:A10)
    • Result: 10
  2. Counting rows in a two-dimensional range:

    • Example: =ROWS(A1:C5)
    • Result: 5

Use Cases and Scenarios

  1. Dynamic Range Building: Determine the size of a data set to feed into OFFSET or INDEX formulas.
  2. Data Validation: Confirm that two ranges have a matching number of rows before comparing them.
  3. Formula Automation: Automatically adjust calculations as rows are added to or removed from a data set.

Related Functions

  • COLUMNS: Returns the number of columns in a specified array or range.
  • COUNTA: Counts the number of non-empty values in a range.
  • INDEX: Returns the content of a cell, specified by row and column offset.

Related Articles

No related articles available for the ROWS function.

Newsletter

More ROWS examples coming soon.

We are building short, practical updates for Sheets power users.