ROWS

Formulas / ROWS
To return the number of rows in a reference.
ROWS(array)
  • reference - [OPTIONAL] refers to the cell or range of cells for which the row number is being returned

Examples

  • =ROWS(A1:F10)

    This example returns 10 because there are 10 rows in the range A1:F10

  • =ROWS(A1:Z100)

    This example returns 100 because there are 100 rows in the range A1:Z100.

  • =ROWS({1;2;3;4;5})

    This example returns 5 because the array constant argument has 5 rows.

Summary

The ROWS function is used to count the number of rows in an array, array formula, or cell range reference.

  • The ROWS function takes one argument called array, which can be a range or a reference to a single contiguous group of cells.
  • To count the number of columns in a range, use the COLUMNS function instead of the ROWS function.
  • To get row numbers, use the ROW function instead of the ROWS function.
  • To lookup a row number, use the MATCH function instead of the ROWS function.


Frequently Asked Questions

What does the ROWS function do?
The ROWS function returns the count of rows in a given reference.
How does the ROWS function work?
The ROWS function takes one argument, called array, which can be any range or array. Note that the array in this argument can be a constant or can be created by another formula.
How do you get the total number of cells in a range using ROWS?
To get the total number of cells in a range using ROWS, you need to combine it with COLUMNS. The total number of cells in a range is returned by the COLUMNS function multiplied by ROWS.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.