+ Reply to Thread
Results 1 to 13 of 13

delete duplicate rows, delete empty rows

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    42

    delete duplicate rows, delete empty rows

    hello!

    is there a macro to delete all duplicate rows?
    is there a macro to delete all empty rows?

    (seperate macros)

    thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: delete duplicate rows, delete empty rows

    Hello...
    Upload sample data...
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: delete duplicate rows, delete empty rows

    Hi for empty rows You can use this:
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: delete duplicate rows, delete empty rows

    Hi Tom,

    Im happy to learn from you again and again. The above code of yours and your knowledge deserves a rep :-)


    Thanks,

    Bonny Tycoon



    **If I was able to help please click the small star icon at the bottom left of my post **

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: delete duplicate rows, delete empty rows

    For duplicate rows, are there just 2 rows duplicating or more?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Registered User
    Join Date
    04-01-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: delete duplicate rows, delete empty rows

    Quote Originally Posted by arlu1201 View Post
    For duplicate rows, are there just 2 rows duplicating or more?
    there may be more duplicates

    I didnt upload anything, because it has to be universal solution

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: delete duplicate rows, delete empty rows

    Based on what conditions should the duplicate rows be deleted? I mean, which are the fields that should be checked for duplicates?

  8. #8
    Registered User
    Join Date
    04-01-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: delete duplicate rows, delete empty rows

    Quote Originally Posted by arlu1201 View Post
    Based on what conditions should the duplicate rows be deleted? I mean, which are the fields that should be checked for duplicates?
    Umm, just when two or more rows are exactly the same, to be more precise, have the same text, but then leave intact the first and delete all subsequent duplicates

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: delete duplicate rows, delete empty rows

    Since you are attempting an universal solution, is there any particular range or can that be changing each time?

  10. #10
    Registered User
    Join Date
    04-01-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: delete duplicate rows, delete empty rows

    Quote Originally Posted by arlu1201 View Post
    Since you are attempting an universal solution, is there any particular range or can that be changing each time?
    the range is from the first not null cell to the last not null cell

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: delete duplicate rows, delete empty rows

    So even if a file has 20 columns of data, you want all 20 columns to be compared to each other for duplicates?

  12. #12
    Registered User
    Join Date
    04-30-2012
    Location
    Massachusetts, US
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: delete duplicate rows, delete empty rows

    This is the code I usually use. It asks which column to check for duplicates and blanks.

    Please Login or Register  to view this content.
    Not the most efficient or best way at all but I personally like it. Good Luck

  13. #13
    Registered User
    Join Date
    04-01-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: delete duplicate rows, delete empty rows

    Quote Originally Posted by arlu1201 View Post
    So even if a file has 20 columns of data, you want all 20 columns to be compared to each other for duplicates?
    regardless of the number of columns, data will be considered as rows only

+ 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