Excel Function: UNIQUE
The Excel function UNIQUE returns the list of unique values from a range of cells or a table.
=UNIQUE(array, by_column, unique_values)
List of Unique Values
In this example, the aim is to obtain the unique list of countries from column A:
Select the UNIQUE function and simply enter the cell range of the countries to obtain the unique list of countries:
To obtain a sorted list of countries, you can add the SORT function:
If you select a range containing several columns, the UNIQUE function will return the list of unique rows:
Search by Column
By default, the search for unique values is carried out row by row.
To list the unique columns, enter the value 1 (or TRUE) as the second argument:
Search for Unique Values
To get only the values present once in the table, enter the value 1 (or TRUE) as the third argument:
For instance, the row Brazil No is present more than once in the table, so it is not listed here.