Excel ROWS function

Counts how many rows a range or result has. In Spanish Excel it is called FILAS.

Syntax

English Excel

=ROWS(array)

Spanish Excel (Mexico)

=FILAS(matriz)

Spanish Excel (Spain, Latin America)

=FILAS(matriz)

ArgumentWhat it is
arrayThe range or result to measure.

Example

ROWS(range) counts how many rows a range or a result has. Applied to UNIQUE, it tells you how many distinct values there are: customers, products or cities.

=ROWS(UNIQUE(B2:B11))

Common mistake

ROWS(UNIQUE(range)) is the shortest way to count distinct values in Excel 365.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice ROWS

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

Count distinct: ROWS + UNIQUE

ROWS(range) counts how many rows a range or a result has. Applied to UNIQUE, it tells you how many distinct values there are: customers, products or cities.

In E2, count how many different regions appear.

E2
ABCDEF
1SalespersonRegionAmountDistinct regions
2CarmenNorth18,500
3JorgeSouth4,200
4LucíaNorth3,900
5AndrésCentral21,000
6PaolaSouth17,800
7RicardoNorth6,400
8ElenaCentral5,900
9MateoNorth19,900
10SofíaWest800
11DiegoCentral4,600
12

Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.

Frequently asked questions

What is ROWS called in Spanish?
In Spanish Excel it is FILAS. The formula =ROWS(UNIQUE(B2:B11)) is written =FILAS(UNICOS(B2:B11)) (or with commas in Mexico).
Why does ROWS use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common ROWS mistake?
ROWS(UNIQUE(range)) is the shortest way to count distinct values in Excel 365.