+ Reply to Thread
Results 1 to 10 of 10

Delete Duplicated rows

  1. #1
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Delete Duplicated rows

    Hi.

    I want a macro that will look for duplicate rows, delete them but leave the last entry available. The thing is I have 4 columns where the information has to be duplicated for it to erase it. Here is an example:

    Fecha Recolección en Danone # Shipment Localidad Tienda
    09/11/2012 34566 MANTE Soriana
    09/11/2012 34566 MANTE Soriana

    Since the 4 columns have the same information, I want it to delete the first row and leave the second.
    How can I do that?

    Regards,

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Delete Duplicated rows

    Try it once.
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Delete Duplicated rows

    Hi Henry,

    I did work but the problem is that my A2 won´t be fixed. The Database will be updated daily and new rows will be added frequently. How can I adapt that to the code?

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Delete Duplicated rows

    Hi Lorena,

    You mean, the next time it could be e.g. A7 ?
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Delete Duplicated rows

    Hi Harry!

    I just resolved the A:2 incident but I rand the code again and it erases the last duplicates found and leaves the first entry found. What I want it to do is to leave the last entry found and to erase the first entries it finds. How could I adapt that to the code?

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Delete Duplicated rows

    Maybe you could upload your file ?

  7. #7
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Delete Duplicated rows

    Hi Harry,

    Here is an example of what my Database looks like. Like I said the information needs to be the same only in columns A,B,C,D. I want to delete the entire duplicate cell but want to keep the last entry found (in this case i want to keep cells A3:H3, A5:H5, A7:H7). I want the code to erase cells A2:H2, A4:H4, A6:H6.

    Is this possible.

    Regards,

    Lorena
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Delete Duplicated rows

    Hi Lorena,

    Try it once.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Delete Duplicated rows

    Thanks so much Harry! It did work. You saved me big time. I really appreciate your help and fast response.

    Kind Regards,

    Lorena

  10. #10
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Delete Duplicated rows

    You're welcome Lorena.

+ 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