Example 2: Sales Product List
Sometimes duplicates occur on combinations of multiple columns, such as Product Name, Price, and Category.
Initial data:
Product Name | Price | Category |
Laptop A | 7.000.000 | Electronic |
Laptop A | 7.000.000 | Electronic |
HP B | 3.000.000 | Electronic |
HP B | 3.000.000 | Electronic |
Wooden Table | 1.500.000 | Furniture |
Steps to Use UNIQUE:
- Select a blank cell to display the results, for example, E2.
- Enter the formula:
=UNIQUE(A2:C6)
- Press Enter.
- Excel will generate a list of unique product combinations, removing duplicate rows that have identical information in all columns.
Output:
Product Name | Price | Category |
Laptop A | 7.000.000 | Electronic |
HP B | 3.000.000 | Electronic |
Wooden Table | 1.500.000 | Furniture |
Using UNIQUE with Additional Criteria
UNIQUE function can become more powerful when combined with other functions such as SORT and FILTER.
Sorting Unique Data with SORT
To get a unique list of names arranged alphabetically, use:
=SORT(UNIQUE(A2:A20))
This formula will generate a unique list of A2:A20, and then sort them from A–Z.
Filtering Unique Data with FILTER
If you only want to display unique data with certain criteria, combine it with FILTER functions. Example: showing a unique customer whose payment status is “Lunas”.
=UNIQUE(FILTER(A2:A20, B2:B20=“Lunas”))
- A2:A20 = customer name field
- B2:B20 = payment status column
Advantages of UNIQUE Functions Over Remove Duplicates
Although Remove Duplicates has long been a built-in feature of Excel for removing duplicate data, the presence of the UNIQUE function provides a significant advantage, especially for dynamic and continuous data processing needs. Here are some of the key advantages of UNIQUE:
1 Dynamic and Real-Time
The UNIQUE function will automatically update the results when the source data changes. Example: If you add a new entry or delete data in a source column, the UNIQUE result list will adjust immediately without having to redo the deduplication process.
2 Not Changing Original Data (Non-Destructive)
Unlike Remove Duplicates, which deletes data directly from the source (destructive), UNIQUE works by displaying results in separate locations without touching the original data. This is especially important if you need to maintain a raw database for auditing or archiving purposes.
3 Efficient for Automated Reports
In the creation of a dashboard or periodic reports, UNIQUE is the best choice because:
- Saves time (no need for repeated manual cleaning).
- Ensure report data is always up-to-date.
- It is easy to combine with other functions such as SORT, FILTER, or COUNTIF for advanced analysis.
4 Flexibility on Column Combinations
UNIQUE can remove duplicates based on the combination of multiple columns at once, something that requires an additional step if using Remove Duplicates manually.
Conclusion:
If you need a one-time data cleanup, Remove Duplicates may be enough. However, for the needs of automation, long-term accuracy, and dynamic reporting, UNIQUE is a far superior choice.