# Excel UNIQUE Function

**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).

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

## 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.