Exceljet

Quick, clean, and to the point

Excel UNIQUE Function

Excel UNIQUE function
Summary 
The Excel UNIQUE function returns a list of unique values in a list or range. Values can be text, numbers, dates, times, etc.
Purpose 
Extract unique values from range
Return value 
Array of unique values
Syntax 
=UNIQUE (array, [by_col], [occurs_once])
Arguments 
  • array - Range or array from which to extract unique values.
  • by_col - [optional] How to sort. By row = FALSE (default); by column = TRUE.
  • occurs_once - [optional] TRUE = values that occur once, FALSE= all unique values (default).
Usage notes 

The Excel UNIQUE function extracts a list of unique values from a range. The result is a dynamic array of values. If this array is the final result (i.e. not handed off to another function) array values will "spill" onto the worksheet into a range that automatically updates when new uniques values are added or removed from the source range.

Examples

To return unique values from in the range A1:A10, you can use a formula like this:

=UNIQUE(A1:A10)

To return unique values from the horizontal range A1:E1, set the by_col argument to TRUE or 1:

=UNIQUE(A1:E1,1) // extract unique from horizontal array

The UNIQUE function has an optional argument called occurs_once that controls how the function deals with repeating values. By default, occurs_once is FALSE. This means UNIQUE will exact unique values regardless of how many times they appear in the source data. If set to TRUE or 1, UNIQUE will extract only unique values that appear just once in the source data:

=UNIQUE(A1:A10,0,1) // values that appear once only
Note: The UNIQUE function is a new "Dynamic Array Function" in Excel. It is a beta feature available only through the Office Insiders program. Dynamic Array functions are expected to be released in 2019 to Office 365 subscribers.

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Excel foundational video course
Excel Pivot Table video training course
Excel formulas and functions video training course
Excel Shortcuts Video Course
Excel Charts video training course
Video training for Excel Tables