Sometimes we may meet duplicate rows exist in table. In previous tutorial we have taught you how to remove duplicate values in excel, this time we will introduce you the method to only keep duplicate rows in table.
Create a simple table. See screenshot below. Obliviously there are some duplicate values.
Method: Remove Everything but Only Keep Duplicate Rows by Formula & Filter Function
To look up duplicate values from the list we can apply COUNTIF function here.
Step 1: In cell B2 enter the formula =COUNTIF($A$2:$A$8, A2)=1. If data in A list is unique, then formula will return True, otherwise it returns False.
Step 2: Click Enter. We get FALSE for product S001, so it has a copy in the list.
Step 3: Drag down the fill handle till reach the end of the list.
Step 4: Click on B column, click Data in ribbon, then click on Filter in Sort & Filter group to create filter.
Step 5: Click small triangle button to load filter criteria. Check on True under Search section, then click OK.
Verify that only TRUE values are listed.
Step 6: Select the visible range except headers. Click Home in the ribbon, then click the small triangle belongs to Find & Select icon in Editing group, then select Go To Special option.
Step 7: On Go To Special dialog, check on Visible cells only option, then click OK.
Verify that visible cells in the table are selected automatically.
Step 8: On selected range, right click to load below options. Select Delete Row.
Step 9: On pops up message, click OK. Then entire sheet rows (visible rows) are deleted immediately.
Step 10: Click Data->Filter again to clear filter.
Verify that only duplicate rows are stayed.
Clear texts in B column, then table with only duplicate rows is displayed properly.