Excel UNIQUE Function

- array - Range or array from which to extract unique values.
- by_col - [optional] How to compare and extract. By row = FALSE (default); by column = TRUE.
- exactly_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 or array. The result is a dynamic array of unique 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 exactly_once that controls how the function deals with repeating values. By default, exactly_once is FALSE. This means UNIQUE will extract 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
Download 200+ Excel Shortcuts
Get over 200 Excel shortcuts for Windows and Mac in one handy PDF.