ROWS Function

Counts how many rows are in a range or array.

Category

Lookup & Reference

Available in

All versions, Microsoft 365

Returns

A count of rows

Taught hands-on in Level 4: Advanced Dynamic Arrays & Logic · Reference Functions module

Overview

ROWS answers 'how tall is this?'. =ROWS(A2:A11) returns 10.

Like COLUMNS, it counts rows whether they're filled or not, making it a reliable size check for dynamic formulas.

Syntax

=ROWS(array) Explain

Arguments

ArgumentRequired?What it does
arrayYesThe range or array whose rows you want to count.

Examples

Example 1 — Counting results from FILTER

How many East rows did FILTER return?

=ROWS(FILTER(A2:C100, B2:B100="East")) Explain

Example 2 — A fill-down counter

Copy down to get 1, 2, 3…

A3fx=ROWS($A$2:A3)
AB
1#Item
21Pens
32Pads
43Ink
=ROWS($A$2:A2) Explain
The locked $A$2 keeps the start fixed while the end grows as you copy down.

Common mistakes

  • Counting values. ROWS counts rows, not filled cells. Use COUNTA for values.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.