+ Reply to Thread
Results 1 to 9 of 9

Need help removing duplicates but with several conditions

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Need help removing duplicates but with several conditions

    I have a large spreadsheet of purchased items (and their respective transaction dates) which has a number of duplicate catalog numbers. I want to get rid of the duplicate entries but only when certain other variables do not apply. Please see below...what is the easiest way to achieve this?
    Here is the logic:
    IF you find duplicate catalog numbers AND the following rules do NOT apply THEN keep the item with the most recent Transaction Date AND add up the Quantities purchased AND remove remaining duplicates
    Rules:
    1. Different Hospital name
    2. Different Manufacturer
    3. Different UOM type

  2. #2
    Registered User
    Join Date
    02-28-2012
    Location
    Tao Virgo
    MS-Off Ver
    Office2010
    Posts
    11

    Re: Need help removing duplicates but with several conditions

    With 2010, I would go to Data > Remove Duplicates being careful what I have checked -- AFTER I HAD BACKED UP MY ORIGINAL SS

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Need help removing duplicates but with several conditions

    you might be better off to create a helper set of columns to find all of the data you want to keep (using If statments) then filter and remove the other data. if you attach a sample set of data i could be more descriptive.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Registered User
    Join Date
    03-05-2012
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help removing duplicates but with several conditions

    Here is an example:
    Facility Name Catalog Num Product Description Manufacturer Name Last Each Price Last Transaction Date Pkg UOM # Items in the PKG Sum of Quantity
    Bobs Business 132 10" file Sampson $0.60 1/27/2012 CA 50 20
    Bobs Business 132 10" file Sampson $0.60 1/27/2012 CA 50 76
    Toms Business 132 10" file Tiger $0.75 1/31/2012 EA 1 8,097
    Bobs Business 5000 3.0mm Riger outlay Sampson $1.08 1/31/2012 EA 1 332
    Toms Business 5000 3.0mm Riger outlay Sampson $1.08 12/26/2011 CA 20 8
    Toms Business 5000 3.0mm Riger outlay Sampson $1.08 12/26/2011 CA 20 4
    Toms Business 5000 3.0mm Riger outlay Sampson $1.08 1/26/2012 EA 1 157
    Toms Business 5000 3.0mm Riger outlay Tiger $1.15 1/26/2012 EA 1 197

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Need help removing duplicates but with several conditions

    can you attach that as a workbook, its difficult to recreate it.

  6. #6
    Registered User
    Join Date
    03-05-2012
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help removing duplicates but with several conditions

    Hello DGagnon
    I have attached the spreadsheet sample. Let me know your thoughts.
    Webercs
    Attached Files Attached Files
    Last edited by webercs; 03-21-2012 at 12:06 PM.

  7. #7
    Registered User
    Join Date
    03-05-2012
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help removing duplicates but with several conditions

    Hello DGagnon, I have attached a spreadsheet example, if you don't mind taking a look.
    Thanks
    Chris

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Need help removing duplicates but with several conditions

    See if this workbook helps

    I have put the results on a seperate sheet, "Sheet1", Columns A:B can be hidden with the grouping button.

    In your original sheet, the dates should be serial dates, not text. I have changed this.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  9. #9
    Registered User
    Join Date
    03-05-2012
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help removing duplicates but with several conditions

    This is great Marcol. Thank you for your help, this solves my problem and is something I can replicate on my own now.

+ 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