+ Reply to Thread
Results 1 to 6 of 6

Delete duplicate rows and retain only one

  1. #1
    Registered User
    Join Date
    02-05-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    41

    Delete duplicate rows and retain only one

    Hi,
    I want to delete the duplicate rows by comparing numbers and retain only one row from each duplicate rows.

    How can i do it? Mock spreadsheet is attached.
    Thanks in advance for your expert help.
    Attached Files Attached Files
    Last edited by canada123; 02-25-2010 at 12:46 AM. Reason: Item solved

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Delete duplicate rows and retain only one

    Hello cnada123,

    Did you want the results on the same sheet or on another sheet? Are looking for a Formula solution or VBA macro?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-05-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Delete duplicate rows and retain only one

    Quote Originally Posted by Leith Ross View Post
    Hello cnada123,

    Did you want the results on the same sheet or on another sheet? Are looking for a Formula solution or VBA macro?
    Either same sheet or another sheet will be ok. while VBA macro is preferred.
    Thanks for asking.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Delete duplicate rows and retain only one

    Hello Canada123,

    This macro has been added to a button on "Sheet1". You will need to change the worksheet name and starting cell to what you will be using. This has been added to the attached workbook.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-05-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    41

    Thumbs up Re: Delete duplicate rows and retain only one

    Quote Originally Posted by Leith Ross View Post
    Hello Canada123,

    This macro has been added to a button on "Sheet1". You will need to change the worksheet name and starting cell to what you will be using. This has been added to the attached workbook.
    Please Login or Register  to view this content.
    Hi Leith Ross,
    I can't believe.
    It worked 100% perfect. Excellent.
    Thank you so much. You are genius.

  6. #6
    Forum Contributor
    Join Date
    09-09-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Delete duplicate rows and retain only one

    Hi Leith Ross,

    I have been trying to use your code. It is working good for me, but how do I change it from deleting all of the duplicates underneath the the first duplicate row, too deleting all of the duplicates above the last duplicate row.

    Also, how do I add code to have it also delete blank rows as well.

    Your help is appreciated.

    Thank you.

+ 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