ROWS Function in Excel: How Many Rows in a Range

ROWS Function in Excel: How Many Rows in a Range featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min read

LookupLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. ROWS in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

ROWS counts the rows in a range or array β€” the classic helper for top-N lists that fill down.

Advertisement

Syntax

=ROWS(array)
Argument What it means
array Range or array.

Examples

Example 1

=LARGE($E$2:$E$500, ROWS(E$2:E2))

Fill down: 1st, 2nd, 3rd… largest.

Example 2

=ROWS(FILTER(A2:A500, B2:B500="North"))

Count of filtered results (Excel 365).

ROWS in practice

Where you will use it

  • Count rows in a range or table
  • Running serial numbers: ROWS($A$2:A2)
  • Check expected record counts

Worked example

RangeFormulaResult
A2:A10=ROWS(INDIRECT(A2))9
B1:B500=ROWS(INDIRECT(A3))500
5:9=ROWS(INDIRECT(A4))5

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Confusing with ROWROWS counts, ROW gives the position
Counting data rowsUse COUNTA for filled rows

ROW Β· COLUMNS Β· COUNTA

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Lookup & reference17 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong