UNIQUE function - quick way to find unique values in Excel
Welcome to the 16th edition of my newsletter "Mastering Data Analytics"

UNIQUE function - quick way to find unique values in Excel

The introduction of the UNIQUE function in Excel 365 has changed everything! What used to be a rocket science becomes as easy as ABC. Now, you don't need to be a formula expert to get unique values from a range, based on one or multiple criteria, and arrange the results in alphabetical order. All is done with simple formulas that everyone can read and adjust for your own needs.

Excel UNIQUE function

The UNIQUE function in Excel returns a list of unique values from a range or array. It works with any data type: text, numbers, dates, times, etc.

The function is categorized under Dynamic Arrays Functions. The result is a dynamic array that automatically spills into the neighboring cells vertically or horizontally.

The syntax of the Excel UNIQUE function is as follows:

UNIQUE(array, [by_col], [exactly_once])

Where:

Array (required) - the range or array from which to return unique values.

By_col (optional) - a logical value indicating how to compare data:

  • TRUE - compares data across columns.
  • FALSE or omitted (default) - compares data across rows.

Exactly once (optional) - a logical value that defines what values are considered unique:

  • TRUE - returns values that occur only once, which is the database notion of unique.
  • FALSE or omitted (default) - returns all distinct (different) values in the range or array.

Basic UNIQUE formula in Excel

Below is an Excel unique values formula in its simplest form.

The goal is to extract a list of unique names from the range B2:B10. For this, we enter the following formula in D2:

=UNIQUE(B2:B10)

Please notice that the 2nd and 3rd arguments are omitted because the defaults work perfectly in our case - we are comparing the rows against each other and wish to return all the different names in the range.

When you press the Enter key to complete the formula, Excel will output the first found name in D2 spilling the other names into the cells below. As the result, you have all the unique values in a column:

Article content

In case your data is across the columns from B2 to I2, set the 2nd argument to TRUE to compare the columns against each other:

=UNIQUE(B2:I2,TRUE)

Type the above formula in B4, press Enter, and the results will spill horizontally into the cells to the right. Thus, you'll get the unique values in a row:

Article content


Unlock the power of data analytics to drive game-changing insights and make informed decisions. 

Like
Reply

Congratulations on the 16th edition of "Mastering Data Analytics"! Always looking forward to your insights and expertise. Keep up the great work!Vinayak Jadhav

Like
Reply

Exploring unique functions in Excel for data analytics is crucial! Your newsletter seems like a valuable resource for mastering these skills. Looking forward to more insights.

Like
Reply

That's exciting! I'm always interested in learning more about data analytics. What are some of the topics you'll be covering in this edition of "Mastering Data Analytics"? Looking forward to reading it!

Like
Reply

The UNIQUE function is a valuable addition to Excel's formula repertoire, and its applications are numerous, including data cleaning, data visualization, and data summarization.

Like
Reply

To view or add a comment, sign in

More articles by Vinayak Jadhav

  • TRIMRANGE Excel Function

    Summary The Excel TRIMRANGE function removes empty rows and columns from a range of data. The result is a "trimmed"…

    28 Comments
  • The Future of Excel: Emerging Trends and Technologies

    Excel, the ubiquitous spreadsheet software, has been a staple in businesses for decades.1 But the landscape of data…

    16 Comments
  • Must Know Differences for Excel:

    👉 VLOOKUP vs INDEX MATCH: VLOOKUP: Searches for a value in the first column and returns a value in the same row from a…

    12 Comments
  • XLOOKUP or INDEX MATCH

    XLOOKUP vs INDEX MATCH - syntax comparison First things first, let's break down the syntax of these formulas and…

    15 Comments
  • The Power of Dynamic Array Functions

    In the ever-evolving landscape of data analysis and spreadsheet management, Microsoft Excel has taken a monumental leap…

    15 Comments
  • New Formulas in Excel 2023 Can increase Our Productive

    Microsoft Excel is a powerful spreadsheet application that can be used to automate tasks, analyze data, and create…

  • Power BI interview questions and answers

    1. Question: What is Power BI? Answer: Power BI is a business analytics service by Microsoft that provides interactive…

    12 Comments
  • Mastering Data Cleaning and Transformation for Powerful Data Analysis

    In the realm of data analysis, two essential stages often go hand in hand: data cleaning and data transformation. Both…

    12 Comments
  • Essential Functions in Excel for Data Preprocessing

    Microsoft Excel is a great tool for preprocessing and handling structured data. Excel has functions and techniques…

    15 Comments
  • Data Visualization in Excel

    If you want to present a data set you've collected, you can use Microsoft Excel to create spreadsheets and…

    4 Comments

Others also viewed

Explore content categories