+ Reply to Thread
Results 1 to 6 of 6

Delete duplicate rows in Excel

  1. #1
    Forum Contributor vijay2482's Avatar
    Join Date
    03-03-2009
    Location
    Paris,France
    MS-Off Ver
    Excel 2003
    Posts
    263

    Delete duplicate rows in Excel

    Hi all,

    I have a excel file which contains dublicate rows.
    The duplicate rows can be identified based on few cell/column values.
    I need a macro to delete the duplicate rows when the below condition is satisfied:
    let us consider row 5 and row 6:
    If column 7,12,13,16,17,18,19,23,24,27,28,29,30 in row 5 = row 6 then row 6 has to be deleted.
    This condition has to be followed for all other rows in the excel used range.
    Have attached the sample workbook.

    Any help will be helpful.
    Thanks in Advance.
    Last edited by vijay2482; 10-28-2009 at 10:33 AM.
    VIjay

    If you find any of the post useful to your question, please add to the contributor's reputation by clicking the blue scales icon in the blue bar of the post.

  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 in Excel

    Not entirely sure I follow the requirements but perhaps along the lines of:

    Please Login or Register  to view this content.
    NOTE: run on copy of file/sheet when testing given deleting information

  3. #3
    Forum Contributor vijay2482's Avatar
    Join Date
    03-03-2009
    Location
    Paris,France
    MS-Off Ver
    Excel 2003
    Posts
    263

    Re: Delete duplicate rows in Excel

    Thanks a lot.
    Will give it a try and come back.

  4. #4
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Delete duplicate rows in Excel

    I think there is a simple solution for this. In an empty column, concatenate all those specific column values. Then in the next column, find the occurance of the joined values using COUNTIF function. Delete the rows where formulas give a value greater than 1. Do this from bottom to top. See the attached file
    Attached Files Attached Files

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

    Re: Delete duplicate rows in Excel

    johnjohns, that's what the code in post # 2 is already doing.

  6. #6
    Forum Contributor vijay2482's Avatar
    Join Date
    03-03-2009
    Location
    Paris,France
    MS-Off Ver
    Excel 2003
    Posts
    263

    Re: Delete duplicate rows in Excel

    Thanks DonkeyOte.
    The code did exactly what I wanted.
    Thanks once again.

+ 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