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]; …)
| Argument | What it is |
|---|---|
| value1 | The first value or range. |
| value2optional | More 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.
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.
In F2, list each city once.
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Order | City | Seller | Amount | Cities | Distinct sellers | |||
| 2 | P-101 | Monterrey | Carmen | 1200 | |||||
| 3 | P-102 | Guadalajara | Jorge | 850 | |||||
| 4 | P-103 | CDMX | Carmen | 2300 | |||||
| 5 | P-104 | Monterrey | Lucía | 640 | |||||
| 6 | P-105 | CDMX | Jorge | 1750 | |||||
| 7 | P-106 | Guadalajara | Lucía | 980 | |||||
| 8 | P-107 | Monterrey | Jorge | 1500 | |||||
| 9 | P-108 | CDMX | Lucía | 410 | |||||
| 10 | P-109 | Guadalajara | Carmen | 1320 | |||||
| 11 | P-110 | Monterrey | Carmen | 760 | |||||
| 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(…)).