Skip to content

Lessons in your language are coming soon. Formulas already work in your Excel language.

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?

ABC
1CityCities
2LyonLyon
3PortoPorto
4LyonGraz
5Graz
6Porto

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 SORT for an alphabetical list.
  • Using exactly_once to 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 languageFunction nameSeparator
EnglishUNIQUE,
DeutschEINDEUTIG;
FrançaisUNIQUE;
Español (España)UNICOS;
Español (México)UNICOS,
日本語UNIQUE,
한국어UNIQUE,
繁體中文UNIQUE,
ไทยUNIQUE,
ខ្មែរUNIQUE,
Tiếng ViệtUNIQUE;

Practise it

More from this module

All functions