How to keep only duplicates in excel
Tutor 5 (112 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To keep only duplicates in Excel, you need to identify the repeated values first and then filter or remove the unique values. There are several methods to do this, depending on your needs.
Method 1: Using Conditional Formatting
Select the range of cells you want to check for duplicates.
Go to the Home tab.
Click Conditional Formatting → Highlight Cells Rules → Duplicate Values.
In the dialog box, select a format to highlight duplicates (e.g., light red fill with dark red text).
Click OK. The duplicate values will now be highlighted.
You can filter by color to display only the duplicates:
Go to the Data tab.
Click Filter.
Use the filter dropdown on the column → Filter by Color → choose the highlight color.
This method keeps only the duplicate entries visible.
Method 2: Using the COUNTIF Function
Suppose your data is in column
AfromA2:A100.In a new column
B, enter the formula to identify duplicates:=IF(COUNTIF(A:A, A2)>1, "Duplicate", "Unique")
Drag the formula down to apply it to all rows.
Apply a filter on column
B:Go to the Data tab → Filter.
Click the filter dropdown → select Duplicate.
Only rows labeled "Duplicate" will be displayed.
Copy these rows to another sheet if you want to keep only duplicates.
Method 3: Using Excel’s Remove Duplicates Tool (Workaround)
The Remove Duplicates tool usually deletes duplicate entries and keeps one, but you can use a workaround:
Add a helper column to count occurrences:
=COUNTIF(A:A, A2)
Filter this helper column to show only values greater than 1.
Copy the filtered data to a new sheet. This sheet will have only duplicates.
Notes and Variations
On Mac, all steps are the same except menu names slightly differ: Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values is identical.
This process works for both text and numbers.
If duplicates exist across multiple columns, you can modify the COUNTIF formula to COUNTIFS for multiple criteria.
This approach ensures that only repeated entries remain, while unique values are excluded. It is especially useful for cleaning large datasets or preparing data for analysis.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why is drop down list not showing in excel
Answers · 0
Why is the drop down list not showing all options
Answers · 1
Why can't I delete drop down list excel
Answers · 1
How to create an Excel drop-down list from a lookup table
Answers · 1