+ Reply to Thread
Results 1 to 3 of 3

Remove duplicates based on criteria

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Fredericton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Remove duplicates based on criteria

    I have over 600,000 lines (client entries) in my excel 2007 file I run reports on. In order to run some reoprts on the entire list I need to remove duplicate entries.

    Each line represents one person. Each person has an owner assigned to them, but they can also be entered as having seen another representative (they have their sales rep, but sometimes make purchases from other reps).

    I need to remove the duplicate clients but with the criteria that the retained record is the one which shows the client has an assigned sales rep, if one is assigned.

    In each record all the client detail is identical, only the sales person supplying the service information changes. The sales rep displayed for each client will be their assigned rep or if none is assigned then any rep they have seen. The field in the spreadsheet for assignment of a rep is boolean - 0 for not owner, 1 for owner.

    When this is complete I should have about 500,000 lines (unique entries), so still a great deal of information. The list should show each client and the information of their encounters with our sales rep.

    thanks for any advice!

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Remove duplicates based on criteria

    I think you should be able to achieve that using Advanced Filter.

    http://www.contextures.com/xladvfilter01.html

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    06-21-2011
    Location
    Fredericton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Remove duplicates based on criteria

    Thanks, I thought of that but I had a concern (can't recall now what it was). As I hit post the lightbulb came on for an easy solution. I sort by the assigned owner boolean field (1, 0) the use the excel remove duplicates tool. Since the record with an assigned owner (the 1 in the owner field) will be read first it will be kept and the non-owned records for the same client, if exisiting, will be removed.
    jeff

+ 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