How to Use the UNIQUE Function in Excel

The UNIQUE function allows you to quickly extract distinct values from a dataset. It’s especially useful when working with large tables where you need to identify unique items such as technicians, job types, customers, or service zones. In this lesson, you’ll see how the UNIQUE function can generate a list of distinct technicians from HVAC work order data, along with a few useful tricks like removing blank results, retrieving multiple columns, and identifying values that appear exactly once.

Download the Excel file used in this tutorial:

The UNIQUE Function

1. Select the data you want to extract unique values from

  • Identify the column that contains the values you want to analyze (for example: technicians, job types, service zones, or customers).
  • Apply the UNIQUE function to that range.
  • The function returns a list containing only distinct values from the dataset.

2. Generate a unique list from a defined range

  • Instead of selecting the entire column, you can select only the rows that contain data.
  • This produces a clean list of unique values without including unnecessary blank rows.
  • This method is often used when creating lists for dropdowns, reports, or summary tables.

3. Generate unique values from an entire column

  • The UNIQUE function can also be applied to an entire column.
  • When this happens, Excel may return a zero because blank rows are treated as a value.
  • A simple trick is to add a period after the column reference, which removes the zero created by blank rows.

4. Retrieve unique combinations from multiple columns

  • The UNIQUE function can also return distinct combinations of values across two or more columns.
  • For example, selecting both a customer name column and a city column will produce unique pairs.
  • This is useful when identifying distinct relationships in a dataset.

5. Remove blank values from the beginning or end of results

  • If blank rows exist above or below your dataset, the unique list may show a zero at the top or bottom.
  • Adding a period before or after the column reference can remove those blank results.
  • Using both removes blanks from both directions.

6. Count how many unique values exist

  • If you want to count how many distinct values were returned, wrap the result with COUNTA.
  • COUNTA counts all non-blank values, including text entries.
  • This is commonly used to determine how many unique technicians, customers, or job types appear in a dataset.

7. Return only values that appear exactly once

  • The UNIQUE function includes an optional argument that allows you to return values that appear exactly once in the dataset.
  • When enabled, Excel removes any value that appears multiple times.
  • This is helpful when identifying outliers or records that occur only once.

8. Combine UNIQUE with other functions

  • The UNIQUE function becomes more powerful when nested with other functions.
  • For example, you can combine it with:
    • COUNTA to count distinct values
    • SORT to automatically order results
  • These combinations are often used when building dynamic lists and reports.

9. Use UNIQUE as part of dynamic Excel models

  • The UNIQUE function is a dynamic array function, meaning results automatically expand and update when the source data changes.
  • This makes it ideal for dashboards, dropdown lists, and automated summaries that should update when new records are added.

The UNIQUE Function in Excel

Q1. What does the UNIQUE function do in Excel?
The UNIQUE function returns a list of distinct values from a range or column. It automatically removes duplicates so you can quickly see all unique entries in your dataset.

Q2. When should I use the UNIQUE function?
Use the UNIQUE function whenever you need to identify distinct items in your data. Common examples include finding unique technicians, customers, product categories, job types, or geographic regions.

Q3. Can the UNIQUE function return more than one column?
Yes. If you select multiple columns in the formula, Excel will return unique combinations of those columns. This is helpful when you want to identify distinct pairs such as customer name and city or technician and service zone.

Q4. Why do blank values sometimes appear in UNIQUE results?
When referencing an entire column, Excel may include blank cells as a unique value. Small adjustments to the formula can remove those blanks so the result only shows meaningful entries.

Q5. Can I count how many unique values exist in a dataset?
Yes. The UNIQUE function can be combined with functions like COUNTA to count how many distinct items exist in a range, such as the number of unique technicians or customers.

Q6. What does the “exactly once” option in UNIQUE do?
The UNIQUE function includes an option that returns only values that appear exactly one time in the dataset. This can help identify rare events, unusual entries, or items that only occurred once in your data.

 

Get more lessons like this
by joining our newsletter

Receive weekly Excel tutorials, tips, and KPIs straight to your inbox

Databoards

Analysis & Development