Skip to main content

How to remove everything but duplicate rows in Excel?

Author Xiaoyang Last modified

Maybe, there are some duplicate values in a column of your worksheet, and now, you want to remove non-duplicate values and keep only the duplicate records in the column. Do you have any good ideas to solve this problem in Excel? In this article, I will talk about how to quickly and easily remove all but keeping the duplicate rows in Excel.

Remove everything but duplicate rows with a helper column

Remove everything but duplicate rows with Kutools for Excel


Remove everything but duplicate rows with a helper column

To remove the non-duplicate rows, you need to create a formula helper column first, and then filter all the unique values based on your helper column, finally, delete the filtered unique values. Please do as follows:

1. Enter this formula =COUNTIF($A$2:$A$15, A2)=1 into a blank cell besides your data, such as cell B2, see screenshot:

A screenshot of a formula in Excel used to identify non-duplicate rows

Tip: In the above formula, A2:A15 is the column range you want to remove the unique values, you can change it as you need.

2. And then drag the fill handle down to the cells that you want to apply this formula, False indicates the duplicate values and True stands for the unique values, see screenshot:

A screenshot showing TRUE and FALSE values indicating unique and duplicate rows in Excel

3. Then select the data range and click Data > Filter, see screenshot:

A screenshot of the Filter option in the Data tab of Excel

4. Click the filter drop-down in the new helper column B and uncheck FALSE option to just show the unique values of column A, and then click OK button, see screenshot:

A screenshot of the filter drop-down in Excel to show unique values

5. After showing only the non-duplicate records, select the entire rows of these visible rows, and then click Home > Find & Select > Go To Special, in the Go To Special dialog box, select Visible cells only option, see screenshots:

A screenshot showing Go To Special option on the ribbon  2 A screenshot showing the Go To Special dialog box

6. Then click OK to close the dialog box, and only the visible rows have been selected as following screenshot shown:

A screenshot showing the selected non-duplicate rows in Excel

7. And then you need to remove these visible rows only, put the cursor at the selected rows, right click to choose Delete Row from the context menu, see screenshot:

A screenshot of the Delete Row option

8. And only the visible rows are deleted at once, then you need to cancel the filter by clicking Data > Filter again to disable the Filter function, and you can see all the unique value rows have been removed, and only leave the duplicate records, see screenshot:

A screenshot showing the remaining duplicate rows in Excel after deleting non-duplicate rows

9. At last, you can delete the content of helper column B as you want.


Remove everything but duplicate rows with Kutools for Excel

With above method, there are so many steps needed to be followed, if you have a handy tool – Kutools for Excel, it may save you a lot of time.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, please do as follows:

1. Select the data range that you want to use.

2. Then click Kutools > Select > Select Duplicate & Unique Cells, see screenshot:

A screenshot of Kutools for Excel's Select Duplicate & Unique Cells feature

3. In the Select Duplicate & Unique Cells dialog box, select Unique values only under the Rule section, and check Select entire rows option, see screenshot:

A screenshot showing the Select Duplicate & Unique Cells dialog box

4. Then click OK button, and a prompt box will pop out to remind you how many rows have been selected:

A screenshot of a prompt box confirming the number of selected unique rows

5. And then click OK to close theses dialogs, and all the unique value rows have been selected, see screenshot:

A screenshot showing the selected unique rows

6. Then you just need to remove theses selected rows, click Home > Delete > Delete Sheet Rows, see screenshot:

A screenshot of the Delete Sheet Rows option in Excel

7. And all the selected unique rows have been deleted immediately.

With this Select Duplicate & Unique Cells feature, you can also finish the following tasks:

How to find duplicate rows in a range in Excel?

How to filter or select unique records from selected range in Excel?

How to remove duplicates and replace with blank cells in Excel?

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Demo: Remove everything but duplicate rows with Kutools for Excel

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!