+ Reply to Thread
Results 1 to 2 of 2

Problems removing duplicates from a LONG list based on conditions

  1. #1
    Registered User
    Join Date
    09-21-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    21

    Problems removing duplicates from a LONG list based on conditions

    Hi,

    I recently posted this question on here and received some help from a member, but we encountered a problem that could not be fixed and thus I need to ask for help again!! My knowledge of VBA is limited, and whereas I have understood what I have learnt so far I am not experienced enough to be writing code this long myself so if any experts out there can be help me I will be eternally grateful.

    I have lists of people who have entered competitions which go through a data cleaning process and end up in the format of the file attached to this post. That part works fine, but what I need to do next is run a new macro to remove the duplicated entries so that where people have entered the competition more than once my final list should exclude the duplicates and display only 1 row per unique user.

    I need unique users to be determined by a matching name AND email address (columns A and B). The address, phone and postcode columns can be ignored but do need to be displayed in the final list which should retain the original column structure.

    This is the hard bit...

    If someone is logged into the website when entering a competition the status of "Yes" is automatically assigned to the VIP column (G), but then some people will enter the competition repeatedly and if they are not logged in on any of these occasions a "No" for VIP is returned. My problem is that in the final non-duplicated list I need to know who is a VIP, and therefore if any of one persons has a Yes in that column, even if it is just one out of several entries I need the final list to retain that yes for their VIP status.

    This was my original code that worked perfectly for removing duplicates but did not take into account the Yes/No condition:

    Please Login or Register  to view this content.
    And this is what another user wrote that seemed to work but when I tested it thoroughly there was a lot of "No"s returned for users who should have been "Yes":

    Please Login or Register  to view this content.
    --------------

    In the example file "Catherine Paice" "Francis Healey" and "Wendy Price" should all be returned in the final non-duplicated list as YES because they have yes and no from various entries, but Julia Cook should have her final listing as NO as she was no every time.

    I really hope this makes sense!!! The real databases are much much bigger 3k - 5k rows before duplicates removed, hence this being way beyond my knowledge...

    Any help would be GREATLY appreciated - as time is running out for me to get this all sorted, and once this is done I have something even bigger to tackle!!


    Susie
    Attached Files Attached Files
    Last edited by metalpoker; 10-10-2011 at 12:20 PM.

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

    Re: This is a long post!! Macro to remove duplicates from a LONG list based on condit

    This should help you:
    Please Login or Register  to view this content.

+ 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