UNIQUE function in Excel
Returns a list of unique values in a list or range
=UNIQUE(array, [by_col], [exactly_once])UNIQUE syntax and parameters
Three arguments, one required.
- arrayarrayRequired
The range or array from which to return unique rows or columns
- by_colbooleanOptional
The by_col argument is a logical value indicating how to compare.TRUE will compare columns against each other and return the unique columnsFALSE (or omitted) will compare rows against each other and return the unique rows
- exactly_oncebooleanOptional
The exactly_once argument is a logical value that will return rows or columns that occur exactly once in the range or array. This is the database concept of unique.TRUE will return all distinct rows or columns that occur exactly once from the range or arrayFALSE (or omitted) will return all distinct rows or columns from the range or array
UNIQUE examples
Formulas you'll actually reuse.
The distinct customer list from an orders sheet, in first-seen order:
=UNIQUE(A2:A200)Customers who ordered exactly once (exactly_once = TRUE):
=UNIQUE(A2:A200, FALSE, TRUE)
UNIQUE in Google Sheets
Same name — your formula ports as-is.
Try UNIQUE in the playground
Edit the example — nothing to install.
Preloaded with the UNIQUE formula from Example 1 — change anything and watch it respond.
Related functions
More ways Excel gets this done.
- ADDRESSReturns a reference as text to a single cell in a worksheetLookupGoogle Sheets
- AREASReturns the number of areas in a referenceLookupNo Google Sheets equivalent
- CHOOSEChooses a value from a list of valuesLookupGoogle Sheets
- CHOOSECOLSReturns the specified columns from an arrayLookupGoogle Sheets
- CHOOSEROWSReturns the specified rows from an arrayLookupGoogle Sheets
- COLUMNReturns the column number of a referenceLookupGoogle Sheets