Manually removing duplicate values in a list can be a dull, tedious task. Luckily, Excel has a “unique” function that can remove duplicates in seconds.
If you’re unfamiliar with the Unique function, it’s because it’s new. It returns a list of unique values from a data range by removing all duplicate values. The best part? It’s extremely simple to use.
All you have to do is enter your target data range as the array argument, and Excel will automatically return a new list with all the duplicate values removed.
If you’re working with more complex data and need to remove the duplicate values from the columns instead of the rows, set the by_col argument to True, and the Unique function will remove all of the duplicate values within the data range.
The Unique function has one more argument: exactly_once. This argument does precisely what it sounds like it does: It returns the values within the data range that appear exactly once. So if you want to return all of the values in a list that don’t have any duplicates, just set the exactly_once argument to True.
Hopefully you can now see why the Unique functions are so…unique.