UNIQUE Function in Excel 2007, 2010, 2013, 2016 & 2019

The UNIQUE function was officially introduced with Excel 2021, but thanks to Modern Functions Update (MFU) you can now run it on your Excel 2007, 2010, 2013, 2016 and 2019 versions. It works exactly as its original Microsoft counterpart.


Description

The UNIQUE function returns a list of unique values from a range or array. The result is a dynamic array that automatically spills onto the worksheet and updates when the source data changes.

Think of it as the ultimate duplicate remover. Instead of using complex array formulas or the “Remove Duplicates” feature, a single formula gives you a clean, live list of unique values.

This is particularly useful for:

  • Data cleaning: Quickly extract a list of distinct products, customers, or categories 
  • Creating dropdown menus: Generate clean, duplicate-free source lists for data validation 
  • Dashboard building: Create dynamic lists that update automatically when source data changes 
  • Data analysis: Count unique values by combining UNIQUE with COUNTA 
  • Report generation: Build lists that never contain duplicates

Syntax

=UNIQUE(array, [by_col], [exactly_once])
ArgumentDescription
arrayRequired. The range or array from which to extract unique values.
[by_col]Optional. A logical value specifying how to compare: FALSE (default) compares by row; TRUE compares by column.
[exactly_once]Optional. A logical value: FALSE (default) returns all unique values; TRUE returns only values that appear exactly once.

Important Notes

  • The UNIQUE function is case-insensitive: “APPLE”, “Apple”, and “apple” are treated as identical.
  • If there are blank cells in the range, UNIQUE considers the blank as a valid unique value.
  • The result is a dynamic array that spills into adjacent cells automatically.
  • UNIQUE treats text and numbers as different types. “10” (text) and 10 (number) are considered different.

Examples

Basic Usage – Unique Values from a Column

To extract a list of unique values from the range all Column E:

=UNIQUE(E:E)
unique-function-excel-2007-2010-2013-2016-2019
UNIQUE function in Excel 2007 thank to MFU

Unique Rows from Multiple Columns

To extract unique combinations from two columns:

=UNIQUE(B5:C15)

Returns all unique combinations of Group and Color.

Distinct Values (Appear Exactly Once)

To return only values that appear exactly once in the data:

=UNIQUE(B5:B16,,TRUE)

Returns only values that occur once, not those that appear multiple times.

Count Unique Values

To get a count of unique values, combine UNIQUE with COUNTA:

=COUNTA(UNIQUE(B5:B16))

Returns the number of unique values in the range.

Unique Values from Horizontal Data

If your data is arranged in columns rather than rows, set by_col to TRUE:

=UNIQUE(C4:I4,TRUE)

Extracts unique values from a horizontal range and spills the result across columns.

Sort Unique Values Alphabetically

Combine UNIQUE with SORT:

=SORT(UNIQUE(B5:B16))

Returns the unique values sorted in alphabetical order.

Unique Values Ignoring Blanks

To exclude blank cells from the result:

=UNIQUE(FILTER(B5:B16, B5:B16<>""))

The FILTER function removes blanks before UNIQUE processes the data.

Unique Values with Criteria

To extract unique values that meet specific criteria:

=UNIQUE(FILTER(B5:B16, C5:C16=E4))

Returns unique values from column B where the corresponding value in column C matches the criteria in E4.


Practical Use Cases

ScenarioFormula
Extract unique products=UNIQUE(A2:A100)
Count unique customers=COUNTA(UNIQUE(B2:B100))
Unique combinations=UNIQUE(A2:B100)
Values appearing once=UNIQUE(A2:A100,,TRUE)
Unique horizontal data=UNIQUE(A1:E1,TRUE)
Sorted unique list=SORT(UNIQUE(A2:A100))
Unique with criteria=UNIQUE(FILTER(A2:A100, B2:B100="USA"))
Ignoring blanks=UNIQUE(FILTER(A2:A100, A2:A100<>""))

Common Problems

ProblemWhat It MeansWhat To Do
#NAME? errorYour Excel version doesn’t support UNIQUE Install Modern Functions Update
#SPILL! errorThe spill range is blocked by existing data Clear the cells where the result wants to spill
#REF! errorThe formula references a closed workbook Open the workbook containing the referenced array
Blanks appear as 0Empty cells are included in the source range Use FILTER to remove blanks first

UNIQUE vs Legacy Methods

FeatureUNIQUELegacy Methods (Array Formulas)
SyntaxSimple, readableComplex and hard to maintain
Dynamic updates✅ Auto-updates❌ Manual intervention required
Spill range✅ Yes❌ No
Array formula required❌ No✅ Yes (Ctrl+Shift+Enter)

Notes

  • ✅ Fully tested – The implementation in Modern Functions Update works identically to Microsoft’s original function introduced in Excel 2021.
  • ✅ The function is fully compatible with Excel 2007, 2010, and all later versions.
  • ℹ️ UNIQUE is a dynamic array function, meaning results spill into adjacent cells.
  • ℹ️ If you want to convert the dynamic array to a fixed list, copy and paste as values.
  • ⚠️ UNIQUE cannot be used inside an Excel Table; it will cause a #SPILL! error.
  • ℹ️ The function works with text, numbers, dates, and other data types.

See Also

  • FILTER – Filters a range based on criteria
  • XLOOKUP – Modern lookup function
  • XMATCH – Modern position lookup

Leave a comment