How to Use the UNIQUE Function in Excel

Today, we’ll explore the UNIQUE function, a handy feature available in both Microsoft Excel and Google Sheets. This function is designed to extract unique values from a specified range or array, effectively eliminating any duplicates.

Basic Syntax

The syntax of the UNIQUE function is straightforward:

=UNIQUE(range/array, [by_col], [exactly_once])
  • range/array: Specifies the range of cells or array from which you want to extract unique values.
  • by_col (optional): Determines the orientation for comparison:
    • TRUE (default) – Compares values column by column.
    • FALSE – Compares values row by row.
  • exactly_once (optional): Defines the frequency of occurrence for inclusion:
    • FALSE (default) – Includes all unique values.
    • TRUE – Includes only those values that occur exactly once.

Examples of Using the UNIQUE Function

Example 1: Extracting Unique Values

Consider a list of fruit names from which we need to identify unique items:

A B
1 Apple
2 Apple
3 Orange
4 Banana
5 Orange

By applying the formula =UNIQUE(A1:A5), we extract the distinct fruit names: Apple, Orange, and Banana.

Example 2: Unique Values That Occur Exactly Once

To identify fruits that appear only once in our list, we use the formula =UNIQUE(A1:A5, FALSE, TRUE). This produces ‘Banana’ as the result, since it is the only fruit that meets this criterion.

The UNIQUE function is invaluable for managing datasets by allowing quick identification of unique elements. It simplifies data analysis and enhances both efficiency and organization in your work.

More information: https://support.microsoft.com/en-us/office/unique-function-c5ab87fd-30a3-4ce9-9d1a-40204fb85e1e

Other functions
Returns a reference as text to a single cell in a worksheet
Returns the number of areas in a reference
Chooses a value from a list of values
Returns the column number of a reference
Returns the number of columns in a reference
Filters a range of data based on criteria you define
Returns the formula at the given reference as text
Returns data stored in a PivotTable report
Looks in the top row of an array and returns the value of the indicated cell
Creates a shortcut or jump that opens a document stored on a network server, an intranet, or the Internet
Uses an index to choose a value from a reference or array
Returns a reference indicated by a text value
Looks up values in a vector or array
Looks up values in a reference or array
Returns a reference offset from a given reference
Returns the row number of a reference
Returns the number of rows in a reference
Retrieves real-time data from a program that supports COM automation
Sorts the contents of a range or array
Sorts the contents of a range or array based on the values in a corresponding range or array
Returns the transpose of an array
Looks in the first column of an array and moves across the row to return the value of a cell
Searches a range or an array, and returns an item corresponding to the first match it finds If a match doesn't exist, then XLOOKUP can return the closest (approximate) match
Returns the relative position of an item in an array or range of cells