The UNIQUE function is safer and dynamic

I used to rely on Excel’s Remove Duplicates tool like a reflex, but it’s actually a dangerous, destructive, dead-end process that leaves no visible audit trail. So, I’ve switched to the UNIQUE function, which turns a static cleanup chore into a live-updating system that never deletes my source data.
The UNIQUE function is available to those using standalone versions of Excel released in 2021 or later, Excel for Microsoft 365, Excel for the web, and the most up-to-date Excel mobile and tablet apps.
Suppose you’re managing a mailing list, where customers sign up for different events. Your master sheet has 50 entries, but some names are repeated.
To clean up the duplicates in the Name column, you select a cell in the table (named T_Signups), click “Remove Duplicates” in the Data tab, and check “Name.”
This leads to several problems:
- Data loss: Acquisition methods are no longer traceable. If you run the tool only on the Name column, Excel deletes the entire row for any second entry. For example, Charlie Day signed up via a referral and a Google Search, but since Excel deletes the whole row for the second entry, that attribution information is lost.
- Static results: The result is a snapshot. The moment a new row is added to the table, your cleaned list is obsolete, forcing a manual redo.
- No audit trail: Beyond a one-time summary dialog, it leaves no formula or log to show why specific rows were removed.
In short, this black box process prioritizes short-term convenience over long-term data integrity.
4 Ways to Rearrange Data in Excel
You probably don’t need to rearrange everything manually.
The solution: The UNIQUE function
Excel’s UNIQUE function is the modern, non-destructive answer to the mailing list problem. Instead of deleting rows from your master table, you use a formula to extract the names into a new area of your workbook.
How the UNIQUE function works
UNIQUE is a dynamic array function, meaning it lives in a single cell but spills the results into a range of cells below or beside it. Its syntax is:
=UNIQUE(array,[by_col],[exactly_once])
While this looks complex, the array (your source data) is usually the only argument you’ll need. The other two are optional toggles:
- by_col: Tells Excel to compare columns instead of rows (defaults to FALSE).
- exactly_once: If set to TRUE, it only returns the items that appear a single time in the source, rather than a list of every distinct value (defaults to FALSE).
Because it’s a formula, it doesn’t change your source data—it simply provides a live, filtered view of it that updates whenever your table changes.
To make the most of the UNIQUE function, you should make sure your array is in an Excel table. By using a table name rather than a static range, the function will automatically detect and include any new rows you add to your dataset.
6 Functions That Changed How You Use Microsoft Excel
Dynamic array functions were a game-changer.
Setting up your dynamic mailing list
In a new sheet or column, enter the following formula to extract a list of unique customer names:
=UNIQUE(T_Signups[Name])
This approach solves the flaws of the manual Remove Duplicates tools instantly:
- Preserves data: Your original table remains untouched. Charlie Day’s referral and search data both stay in your records for marketing reports.
- Dynamic updating: Because the formula points to a table, it’s live. If a new person signs up, their name is added to your list automatically.
- Total transparency: Anyone can click the cell and see the logic. The formula serves as its own audit trail, proving exactly where the data is coming from.
Make sure the cells below your formula are empty. If there is existing data in the way, Excel will return the #SPILL! error instead of your list.
Handling multi-column records safely
The manual Remove Duplicates tool lets you select multiple columns in its dialog box. However, it’s prone to human error—if you have two different customers named Alice Vance with different email addresses, but you forget to check the “Email” box, Excel will delete one of those unique customer entries forever.
UNIQUE handles multi-column ranges with much higher transparency. If you want to find unique pairs of names and emails, select both columns in your array:
=UNIQUE(T_Signups[[Name]:[Email]])
Here, the function treats the entire row as a single record. It will only filter an entry if both the name and the email match perfectly. This is also much safer than the old-school method of creating helper columns to concatenate names and emails just to identify duplicates.
The example above assumes your columns are adjacent. If you need to extract unique values from non-adjacent columns (such as column A and column C, skipping column B), nest the CHOOSECOLS function (Excel for Microsoft 365 and Excel for the web) inside your formula: =UNIQUE(CHOOSECOLS(T_Signups, 1, 3)).
Level up: Combine UNIQUE with SORT
One area where the manual Remove Duplicates tool can’t compete is organization, as it leaves your results in their original order. To get an alphabetized list, you would have to perform a separate manual sort every time you updated the source data.
Because UNIQUE is a dynamic array formula, you can nest it inside the SORT function to handle both tasks at once. To extract unique pairs of names and email addresses, and alphabetize them at the same time, use this formula:
=SORT(UNIQUE(T_Signups[[Name]:[Email]]))
This combination provides a professional set-and-forget system in three ways:
- Self-organizing: If a new customer named Alice signs up, she won’t just appear at the end of your extraction—she’ll automatically jump to the top of your alphabetized summary.
- Logical hierarchy: By default, Excel sorts by the first column identified in the array argument. This keeps all Alice Vances grouped together, making it easy to see if the same person used different emails.
- Zero maintenance: Your report stays professional and perfectly organized without a single manual click, no matter how much data you add to the original table.
4 Excel Function Combinations You Need to Know
Nested functions are the way forward.
While UNIQUE is perfect for daily tasks, there’s one final level of data maturity: Power Query. For large datasets, it’s often the better choice for two main reasons. First, excessive dynamic arrays can cause calculation lag in a workbook, but Power Query handles massive datasets outside the grid, keeping your spreadsheet snappy. Second, it provides a documented audit trail by adding a specific Removed Duplicates step to your query settings. This means you can look back months later and see exactly which columns were used for the filter without ever altering your source data.
- OS
-
Windows, macOS, iPhone, iPad, Android
- Free trial
-
1 month
Microsoft 365 includes access to Office apps like Word, Excel, and PowerPoint on up to five devices, 1 TB of OneDrive storage, and more.
:max_bytes(150000):strip_icc()/Health-GettyImages-1126001884-190f33f51bef40bf9158056d2197ae97.jpg?w=390&resize=390,220&ssl=1)


