To get a list with no duplicates in Excel, use the =UNIQUE(range) formula. This function scans a selected range of cells and returns a new list containing only the first instance of every unique value found, automatically removing all subsequent repetitions. It is a dynamic array function, meaning it spills the results into the cells below and to the right automatically without needing to drag the formula down.
What You'll Need
- A version of Excel that supports dynamic arrays (Microsoft 365, Excel 2021, or Excel for the Web).
- A dataset containing the values you wish to deduplicate.
- An empty area of the worksheet where the unique list can "spill" without being blocked by existing data.
Step-by-Step
- Identify Your Data Range: Locate the column or table range that contains the duplicate values. For example, if your list of customer names is in cells A2 through A100, your range is A2:A100.
- Select the Destination Cell: Click on the empty cell where you want the unique list to begin. Ensure there are enough empty cells below and to the right of this point; if the formula encounters existing data while trying to output the list, it will return a #SPILL! error.
- Enter the UNIQUE Formula: Type
=UNIQUE(into the cell. - Define the Range: While the formula is open, highlight the cells containing your duplicates with your mouse, or manually type the range (e.g.,
A2:A100). The formula should now look like=UNIQUE(A2:A100). - Close and Commit: Type the closing parenthesis
)and press Enter. Excel will immediately generate the list of unique values starting from that cell. - (Optional) Sort the Results: If you want the unique list to be in alphabetical or numerical order, wrap the UNIQUE function inside a SORT function. Change your formula to
=SORT(UNIQUE(A2:A100)). This ensures the deduplicated list is organized and easy to read. - (Optional) Handle Multi-Column Uniqueness: If you have a table with multiple columns (e.g., First Name in Column A and Last Name in Column B) and you only want rows that are unique across both columns, select both ranges:
=UNIQUE(A2:B100). Excel will treat the combination of A and B as a single record.
Common Mistakes
One of the most frequent errors is ignoring the "Spill Range." Because the UNIQUE function is dynamic, it doesn't just sit in one cell; it occupies as many cells as there are unique values. If you accidentally type a character or a space in a cell that the formula needs to occupy, you will see a #SPILL! error. Always ensure the destination area is completely clear.
Another common mistake is applying the formula to a range that includes the header row. If you include cell A1 (the title "Customer Name") in your range, "Customer Name" will appear as one of the unique values in your new list. Always start your range from the first piece of actual data (e.g., A2).
Users often forget that the UNIQUE function is "live." If you change a value in the original source range, the unique list updates automatically. However, you cannot manually edit the values within the spilled list. If you try to type over a value in the output list, the entire list will disappear and be replaced by a #SPILL! error because the formula's path is blocked.
Finally, some users attempt to use this formula in older versions of Excel (like Excel 2016 or 2019). Because UNIQUE is a dynamic array function, it simply does not exist in these versions. Attempting to use it will result in a #NAME? error, which indicates Excel doesn't recognize the function name.
Tips
To make your unique list more robust, convert your source data into an official Excel Table (Ctrl + T). If you use a table, you can use structured references instead of cell coordinates. For example, if your table is named "SalesTable" and the column is "Client", your formula becomes =UNIQUE(SalesTable[Client]). The primary advantage here is that as you add new rows to the bottom of your table, the UNIQUE formula will automatically include those new entries without you having to update the range from A100 to A101.
If you only want to find values that appear exactly once in the original list (ignoring any value that had a duplicate), you can use the optional arguments of the function. The syntax is =UNIQUE(array, [by_col], [exactly_once]). By setting the third argument to TRUE, like =UNIQUE(A2:A100, FALSE, TRUE), Excel will filter out any item that appeared more than once, leaving you only with the truly unique entries.
Combining UNIQUE with the FILTER function is a powerful way to clean data. For instance, if you want a unique list of customers but only those located in "New York," you can nest the functions: =UNIQUE(FILTER(A2:A100, B2:B100="New York")). This tells Excel to first filter the list by city and then remove the duplicates from that filtered result.
Troubleshooting
If the formula does not go to plan, start with these checks:
#SPILL! Error: This is the most common issue. Look for a small dashed border around the area where the data should be. Check every cell within that border for hidden characters, spaces, or existing formulas. Delete the obstructing content, and the list will reappear instantly.
#NAME? Error: This almost always means your version of Excel is too old to support the UNIQUE function. If you are on an older version, you cannot use this formula. Instead, you must use the "Remove Duplicates" tool found under the Data tab on the Ribbon, or use a complex combination of INDEX, MATCH, and COUNTIF functions.
#VALUE! Error: This can happen if the range you selected is invalid or if the formula is trying to process data in a way that is mathematically impossible for the function. Ensure your range is a standard block of cells and not a fragmented selection of non-adjacent cells.
Incorrect Results (Duplicates still appearing): If you see what look like duplicates in your unique list, it is usually due to "invisible" differences in the data. A common culprit is a trailing space (e.g., "Apple" vs "Apple "). To fix this, wrap your range in the TRIM function: =UNIQUE(TRIM(A2:A100)). This removes all leading and trailing spaces before the UNIQUE function evaluates the list.
Frequently Asked Questions
Can I use the UNIQUE formula across multiple worksheets?
Yes. You can reference a range on another sheet by including the sheet name. For example: =UNIQUE(Sheet2!A2:A100). The results will display on your current sheet based on the data from the second sheet.
Does the UNIQUE function remove case-sensitive duplicates?
No, the UNIQUE function is not case-sensitive. It treats "APPLE," "Apple," and "apple" as the same value and will only return one of them. If you need a case-sensitive unique list, you would need to use a more advanced formula involving the EXACT function.
How do I turn the formula results into permanent text?
Since the formula is dynamic, the values will change if the source data changes. To make them permanent, highlight the spilled results, copy them (Ctrl + C), right-click the destination cell, and select Paste Values. This removes the formula and leaves only the text.
Can I get a count of how many unique items are in a list?
Yes. You can wrap the UNIQUE function inside the COUNTA function. Use =COUNTA(UNIQUE(A2:A100)). This will return a single number representing the total count of unique entries in that range.
Will the UNIQUE formula work with numbers and dates?
Yes, it works with any data type, including numbers, dates, and booleans. For dates, ensure the destination cells are formatted as "Date" so you don't see the raw serial numbers instead of calendar dates.