Note: The other languages of the website are Google-translated. Back to English
Log in  \/ 
Register  \/ 


How to remove everything but duplicate rows in Excel?

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

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:

doc remove all but duplicates 1

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:

doc remove all but duplicates 2

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

doc remove all but duplicates 3

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:

doc remove all but duplicates 4

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:

doc remove all but duplicates 5  2 doc remove all but duplicates 6

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

doc remove all but duplicates 7

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:

doc remove all but duplicates 8

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:

doc remove all but duplicates 9

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

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 : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days

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:

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:

doc remove all but duplicates 11 11

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

doc remove all but duplicates 12 12

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

doc remove all but duplicates 13 13

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

doc remove all but duplicates 14 14

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?

Download and free trial Kutools for Excel Now !

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Charles · 1 years ago
    Thanks for the detailed instructions. It worked perfectly! Keep up the great information.