Array

UNIQUE Formula

UNIQUE returns a list of unique (distinct) values from a range, automatically spilling the results into adjacent cells. It eliminates duplicates from a list, making it ideal for creating dropdown lists, summarizing categories, building dynamic reference tables, and identifying distinct entries in a dataset. Available in Excel 365 and Google Sheets.

Syntax

UNIQUE(array, [by_col], [exactly_once])
ParameterDescription
array Parameter of the UNIQUE function.
[by_col] (Optional.) Parameter of the UNIQUE function.
[exactly_once] (Optional.) Parameter of the UNIQUE function.
Try UNIQUE in Viztab — free, no signup

Examples

ABC
1RegionProductUnique Regions
2EastWidgetEast
3WestGadgetWest
4EastWidgetNorth
5NorthGizmo
6WestWidget

Get unique values from a column

Formula
=UNIQUE(A2:A100)
Returns: a spilled list of all distinct values in column A, with duplicates removed

Unique values that appear exactly once

Formula
=UNIQUE(A2:A100, FALSE, TRUE)
Returns: values that appear only once in the range (third argument TRUE = exactly_once)

Unique rows across multiple columns

Formula
=UNIQUE(A2:C100)
Returns: unique combinations of values across columns A, B, and C — rows are compared as a whole

Common Errors

#SPILL!

The cells where UNIQUE needs to output results are not empty. Clear the cells below and to the right of the formula.

#CALC!

The result is an empty array (no data in the source range). Ensure the source range contains data.

Tips

Dynamic dropdowns

Use =UNIQUE(A:A) as a data validation source to create dropdowns that automatically update when new values are added.

Count unique values

Wrap with COUNTA: =COUNTA(UNIQUE(A2:A100)) returns the number of distinct values.

Sort unique values

Combine with SORT: =SORT(UNIQUE(A2:A100)) returns a sorted list of distinct values.

Try UNIQUE in Viztab

Import your data and use UNIQUE with 370+ other formulas. No signup required.

Open Viztab

Related Formulas