+ Reply to Thread
Results 1 to 8 of 8

VBA Remove Duplicates Not Working

  1. #1
    Registered User
    Join Date
    05-05-2014
    Location
    Voorheesville, NY
    MS-Off Ver
    Excel 2007
    Posts
    77

    VBA Remove Duplicates Not Working

    Hello,

    I need help regarding removing duplicates.

    The VBA, I am using is working just find:

    Please Login or Register  to view this content.
    Except for this duplicates:

    "FD0570 RUN DATE: 04/02/20, RUN TIME: 110855 PAGE: 1"

    Would anyone please tell what better way to remove these type of duplicates?

    Thank you very much,

    Cheryl

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: VBA Remove Duplicates Not Working

    Here is code I have used for several years.

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-05-2014
    Location
    Voorheesville, NY
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: VBA Remove Duplicates Not Working

    Hi Alan,

    Your VBA is working just like the VBA I am using however it did not removed those duplicates that has part number ""FD0570 RUN DATE: 04/02/20, RUN TIME: 110855 PAGE: 1". The number change from 1 to 2, so on and so forth.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: VBA Remove Duplicates Not Working

    I am guessing that they are not exact duplicates. There is probably some spacing issues, ie. hidden character, extra spaces. To test this theory.

    In an adjacent column type =Len(cell address) where the cell address is like A4 or B5. See if the length of each is the same.

  5. #5
    Registered User
    Join Date
    05-05-2014
    Location
    Voorheesville, NY
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: VBA Remove Duplicates Not Working

    The length is the same. The only thing that change is the number as:

    FD0570 RUN DATE: 04/02/20, RUN TIME: 110855 PAGE: 1
    FD0570 RUN DATE: 04/02/20, RUN TIME: 110855 PAGE: 2
    FD0570 RUN DATE: 04/02/20, RUN TIME: 110855 PAGE: 3...so on

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: VBA Remove Duplicates Not Working

    Am I missing something? What you are showing in post 5 are not duplicates. If those in Post 5 are to be deleted then you will need to split the column after PAGE: and then run your code.

  7. #7
    Registered User
    Join Date
    05-05-2014
    Location
    Voorheesville, NY
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: VBA Remove Duplicates Not Working

    Hi Alan - Thank you very much for your help. I found another solution to my problem. I indeed up using a VBA that delete rows with certain text.

  8. #8
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA Remove Duplicates Not Working

    Quote Originally Posted by dache416 View Post
    ... what better way to remove these type of duplicates? ...
    ? Dictionary ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 13
    Last Post: 10-22-2019, 02:14 AM
  2. Replies: 6
    Last Post: 11-27-2018, 07:17 AM
  3. Remove Duplicates not working consistently
    By SUPPO_USN in forum Excel General
    Replies: 6
    Last Post: 07-25-2017, 09:14 AM
  4. [SOLVED] Remove duplicates - CountIf / SumProduct not working
    By luislffm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2017, 12:48 PM
  5. [SOLVED] remove duplicates not working does not rmove all
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-05-2015, 08:35 AM
  6. Remove Duplicates Not Working!
    By walle786 in forum Excel General
    Replies: 8
    Last Post: 03-24-2013, 12:37 PM
  7. Replies: 5
    Last Post: 02-28-2012, 02:52 PM

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