Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

Normally when you apply Remove Duplicates command in Excel, it removes the entire duplicate rows. But sometimes, you want the blank cells to replace the duplicate values, in this situation, the Remove Duplicate command will not work. This article is going to guide you remove duplicates and replace with blank cells in Excel.

Remove duplicates and replace with blank cells with Excel function

Remove duplicates and replace with blank cells with Kutools for Excel


arrow blue right bubble Remove duplicates and replace with blank cells with Excel function


If there are some duplicate data in a range, the following two formulas will guide you to remove all duplicates and leave blank cells in the range. Please do as follows:

1. In the adjacent blank cell, in the case, in cell D2, enter the formula =IF(A2="","",IF(COUNTIF($A2:A15,A2)=1,A2,"")). See screenshot:

doc-replace-duplicates-with-blank1

2. Press Enter key, and click cell D2, and then drag the fill handle across to the range that you want to contain this formula. And the remaining values will keep the last item of the duplicates, others have been removed and leave blank cells. See screenshots:

doc-replace-duplicates-with-blank2 -2 doc-replace-duplicates-with-blank3

3. As they are formulas, when you want to copy them, please paste as values.

Tip: If you need to replace all the duplicate values with blank cells and only keep the unique values, the following formula can help you: =IF(A2="", "", IF(COUNTIF(A$2:A$15,A2)>1,"",A2)), and then you will get the following results:

doc-replace-duplicates-with-blank2 -2 doc-replace-duplicates-with-blank4

Note: You can replace cell references in above two formulas according to your case.


arrow blue right bubble Remove duplicates and replace with blank cells with Kutools for Excel

The Select Duplicate & Unique Cells utility of Kutools for Excel can help you quickly select the duplicate values in a range. On the other hand, with this utility, you can also compare two ranges, and select all duplicates in one range at once.

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

1. Select the range that you want to apply this utility.

2. Click Kutools > Select Tools > Select Duplicate & Unique Cells, see screenshot:

doc-replace-duplicates-with-blank5

3. In the Select Duplicate & Unique Cells dialog box, select Duplicates (Except 1 st one) or All duplicates (Including 1 st one) as you need. See screenshot:

doc-replace-duplicates-with-blank6

4. Then click OK, if you select Duplicates (Except 1 st one) option, the duplicate values have been selected which not contain the values appear for the first time. And then press the Delete key to remove them. See screenshots:

doc-replace-duplicates-with-blank7 -2 doc-replace-duplicates-with-blank8 -2 doc-replace-duplicates-with-blank9

5. If you select All duplicates (Including 1 st one) option, all the duplicate values which contain the values appear for the first time, and only leave the unique values. And then press the Delete key to remove them. See screenshots:

doc-replace-duplicates-with-blank7 -2 doc-replace-duplicates-with-blank10 -2 doc-replace-duplicates-with-blank11

Note: Select entire rows: With this option, the entire rows which contain the same values will be selected.

If you want to know more detail information about this function, please visit Select Duplicate & Unique Cells.


Related articles:


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Screen Shot of Excel (with Office Tab installed)

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    Navyasree Janjirala · 10 months ago
    Is there anyway where we could keep the duplicated cell and replace value with a zero??

    Say: There are 2 rows in our worksheet with 2 columns "name", "value". It should not remove the name instead replace the value with 0.

    Excel 10 ------ Excel 10
    Excel 10 ------ Excel 0
  • To post as a guest, your comment is unpublished.
    Jo · 1 years ago
    formula returned blank cells
  • To post as a guest, your comment is unpublished.
    Laxmiprasad · 1 years ago
    This small formula also works : =IF(COUNTIF($A$2:A2,A2)=1,A2,"").. Just drag it
  • To post as a guest, your comment is unpublished.
    Sayan · 1 years ago
    thankx a ton...saved a lot of tym...
  • To post as a guest, your comment is unpublished.
    SACHIN · 1 years ago
    You have shown formula with very clarity, Thereby I got help with easily. If you have any link in which that I can get & search mostly formula by there link.
    :-)