Syntax
| Parameter | Description |
|---|---|
| array | Parameter of the UNIQUE function. |
| [by_col] | (Optional.) Parameter of the UNIQUE function. |
| [exactly_once] | (Optional.) Parameter of the UNIQUE function. |
Examples
| A | B | C | |
|---|---|---|---|
| 1 | Region | Product | Unique Regions |
| 2 | East | Widget | East |
| 3 | West | Gadget | West |
| 4 | East | Widget | North |
| 5 | North | Gizmo | |
| 6 | West | Widget |
Get unique values from a column
=UNIQUE(A2:A100)
Unique values that appear exactly once
=UNIQUE(A2:A100, FALSE, TRUE)
Unique rows across multiple columns
=UNIQUE(A2:C100)
Common Errors
The cells where UNIQUE needs to output results are not empty. Clear the cells below and to the right of the formula.
The result is an empty array (no data in the source range). Ensure the source range contains data.
Tips
Use =UNIQUE(A:A) as a data validation source to create dropdowns that automatically update when new values are added.
Wrap with COUNTA: =COUNTA(UNIQUE(A2:A100)) returns the number of distinct 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