Google Sheets COUNTUNIQUE function

Counts how many distinct values there are. It is a Sheets-only function. It has the same name in Spanish Sheets.

Syntax

English Sheets

=COUNTUNIQUE(value1, [value2], …)

Spanish Sheets (Mexico locale)

=COUNTUNIQUE(valor1, [valor2], …)

Spanish Sheets (Spain, Latin America)

=COUNTUNIQUE(valor1; [valor2]; …)

ArgumentWhat it is
value1The first value or range.
value2optionalMore values or ranges.

Example

UNIQUE(range) returns the list without duplicates, in the order they appear, and spills it downward. COUNTUNIQUE tells you how many distinct values there are. Both keep their names in Spanish.

=COUNTUNIQUE(C2:C11)

Common mistake

Blank cells are not counted. To count distinct values under a condition, combine COUNTA with UNIQUE(FILTER(…)).

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 COUNTUNIQUE

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

UNIQUE and COUNTUNIQUE

UNIQUE(range) returns the list without duplicates, in the order they appear, and spills it downward. COUNTUNIQUE tells you how many distinct values there are. Both keep their names in Spanish.

Step 1/2

In F2, list each city once.

F2
ABCDEFGHI
1OrderCitySellerAmountCitiesDistinct sellers
2P-101MonterreyCarmen1200
3P-102GuadalajaraJorge850
4P-103CDMXCarmen2300
5P-104MonterreyLucía640
6P-105CDMXJorge1750
7P-106GuadalajaraLucía980
8P-107MonterreyJorge1500
9P-108CDMXLucía410
10P-109GuadalajaraCarmen1320
11P-110MonterreyCarmen760
12

The dotted outline shows how far the result should spill.

Frequently asked questions

What is COUNTUNIQUE called in Spanish?
It has the same name: COUNTUNIQUE. Functions that started in Google Sheets keep their English name even in a Spanish spreadsheet. What changes is the separator: Spain and much of Latin America separate arguments with semicolons.
Why does COUNTUNIQUE use semicolons in some spreadsheets?
It depends on each spreadsheet's locale, under File > Settings. Where the comma is the decimal mark (Spain, much of South America), arguments are separated by semicolons. Mexico and United States locales use commas.
What is the most common COUNTUNIQUE mistake?
Blank cells are not counted. To count distinct values under a condition, combine COUNTA with UNIQUE(FILTER(…)).