This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.
Excel function · Dynamic arrays
UNIQUE
Returns the distinct values of a list, each once.
What it does
UNIQUE removes repeats from a list and returns each value once, in the order it first appears. The result spills into as many cells as it needs and updates when the list changes.
Syntax
=UNIQUE(array, [by_col], [exactly_once])Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ,
Arguments
- array
- The list or table to take the values from.
- by_col
- FALSE or left out compares rows; TRUE compares columns.
- exactly_once
- TRUE returns only values that appear exactly once. Left out, every distinct value is returned.
Example
Orders came from five cities, some more than once. Which cities are there?
| A | B | C | |
|---|---|---|---|
| 1 | City | Cities | |
| 2 | Lyon | Lyon | |
| 3 | Porto | Porto | |
| 4 | Lyon | Graz | |
| 5 | Graz | ||
| 6 | Porto |
The formula in C2:
=UNIQUE(A2:A6)The result spills into the cells below: Lyon, Porto, Graz
Lyon and Porto each appear twice, Graz once. Each is listed once, in the order they first appear: Lyon, Porto, Graz.
Common mistakes
- Leaving no room for the result. If cells below are filled, the formula shows
#SPILL!; clear them. - Expecting it to sort. Wrap it in
SORTfor an alphabetical list. - Using
exactly_onceto remove duplicates. TRUE drops every value that repeats, not just the extra copies.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | UNIQUE | , |
| Deutsch | EINDEUTIG | ; |
| Français | UNIQUE | ; |
| Español (España) | UNICOS | ; |
| Español (México) | UNICOS | , |
| 日本語 | UNIQUE | , |
| 한국어 | UNIQUE | , |
| 繁體中文 | UNIQUE | , |
| ไทย | UNIQUE | , |
| ខ្មែរ | UNIQUE | , |
| Tiếng Việt | UNIQUE | ; |