+ Reply to Thread
Results 1 to 7 of 7

Delete Duplicate Rows based on All columns

  1. #1
    Registered User
    Join Date
    09-03-2010
    Location
    Washington
    MS-Off Ver
    Excel 2007
    Posts
    14

    Delete Duplicate Rows based on All columns

    I have a report that I'm trying to remove duplicate rows but I was the macro to look all the columns before deleting the entire duplicate row. I have looked at different macros and they delete rows based on one column but that doesn't work for me because in my data a lot of the columns are the same. I just want the ones that are true duplicates to be deleted.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Delete Duplicate Rows based on All columns

    Concatenate all columns into one and use that column as the basis for you comparison.

  3. #3
    Registered User
    Join Date
    09-03-2010
    Location
    Washington
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Delete Duplicate Rows based on All columns

    The problem is that I need all the columns separated since I run couple of other macros to get specific information for later use. I usually just manually remove the duplicate row but its very time consuming.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Delete Duplicate Rows based on All columns

    No one said to adjust the existing data - simply create a new column that is a concatenation of the others.
    (this concatenation column need not be permanent - it could be created temporarily at run time and exist purely for sake of duplicate removal)

  5. #5
    Registered User
    Join Date
    09-03-2010
    Location
    Washington
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Delete Duplicate Rows based on All columns

    I'm not really sure how to do that.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Delete Duplicate Rows based on All columns

    Post a small yet representative sample file that reflects both "before" & "after"

    The premise is quite simple - if you have data in Columns A:D and want to delete duplicate rows (duplicate means A:D are the same) then you create Column E which is a concatenation of A:D ... where the values in E are the same you have duplicates.

  7. #7
    Registered User
    Join Date
    09-03-2010
    Location
    Washington
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Delete Duplicate Rows based on All columns

    ok I concatenated the columns I 'm trying to use this formula to delete the duplicates but it keeps deleting the whole sheet. My concatenated column is BA.

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-22-2010 at 06:31 PM. Reason: Addded Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1