+ Reply to Thread
Results 1 to 2 of 2

Removing duplicates based on priority and date

  1. #1
    Registered User
    Join Date
    05-12-2015
    Location
    Guadalajara, Mexico
    MS-Off Ver
    Office 2013
    Posts
    1

    Removing duplicates based on priority and date

    Hello members!

    I am working with exel files that contains 3,000+ records and I'm in need to remove duplicates based on 2 things:
    • Priority = "Tier 1", "Tier 2" and "Non active"
    • Date

    Observing the following situations:
    • If my Tier 1 priority is the oldest I should keep that record
    • If no Tier 1 exists, I should keep the oldest Tier 2
    • If no Tier 1 or 2 exists, preferably the record(s) should be deleted or marked in order to delete them manually.
    • Sometimes a Tier 2 will have an older date, in this case we should keep the Tier 2 instead of Tier 1, since it's older (Rows 18 and 19 in the attached file)

    I've attached an extract of the report and I marked in green the rows that should be kept if a Macro can be created for this situation.

    I was trying to adapt Jerry Becauire's approach on this post with no luck since I didn't know how to manage the priorities with the dates

    http://www.excelforum.com/excel-prog...-criteria.html

    I forgot to mention that my main identifier is Column C

    Hopefully someone can help me with this

    Thanks!
    Attached Files Attached Files
    Last edited by booztarsd; 05-12-2015 at 04:18 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Removing duplicates based on priority and date

    You've taken the time to explain the tiers and all, but my observations of the sample data are that you are keeping the first instance of each column C value, and the data has already been sorted by date Ascending, so the first instance of each column C value IS the oldest. Yes?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Removing duplicates from a list based on the latest date
    By Krys14 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 10:05 AM
  2. Removing duplicates based on several columns
    By Crackerdaq in forum Excel General
    Replies: 6
    Last Post: 08-13-2013, 10:33 AM
  3. Removing duplicates based on date criteria?
    By Z74 in forum Excel General
    Replies: 1
    Last Post: 07-15-2013, 05:24 AM
  4. sort data based on date and time priority
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2010, 02:55 PM

Tags for this Thread

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