+ Reply to Thread
Results 1 to 2 of 2

VBA need to delete duplicates with multiple conditions

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    D.C. Washinton
    MS-Off Ver
    Office Mac 2011 and Office 2013
    Posts
    3

    VBA need to delete duplicates with multiple conditions

    Hello everyone, I really need help with this VBA code. What I need first from the spread sheet below is to first detect duplicates from a table and only delete based on the following condition.

    --If they have a 1st signature OR a 2nd signature then keep the line.
    --If they do not have either a 1st signature OR a 2nd signature then it is deleted.
    --If they have both a 1st signature AND a 2nd signature, check for duplicates 1 more time and if there is still a duplicate delete the one with the earlier created

    Keep in mind this has to work in a table column and below is a sample of what I am trying to achieve

    START with this


    FI-Last Name Created Date 1st Signature Date 2nd Signature Date
    JO-FA Sep 2, 2014 Sep 2, 2014 Sep 2, 2014
    JO-FA Aug 26, 2014 Aug 26, 2014 Aug 27, 2014
    JO-FA Aug 27, 2014
    PA-RI Aug 25, 2014 Aug 25, 2014
    PA-RI Aug 26, 2014 Aug 26, 2014
    PA-RI Sep 2, 2014 Sep 2, 2014 Sep 2, 2014
    TE-LE Aug 26, 2014
    TE-LE Aug 25, 2014
    TE-LE Sep 2, 2014 Sep 2, 2014

    END with this

    FI-Last Name Created Date 1st Signature Date 2nd Signature Date
    JO-FA Sep 2, 2014 Sep 2, 2014 Sep 2, 2014
    PA-RI Sep 2, 2014 Sep 2, 2014 Sep 2, 2014
    TE-LE Sep 2, 2014 Sep 2, 2014

    Any help would be really appreciated

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VBA need to delete duplicates with multiple conditions

    Welcome to the forum. Pls take some minutes to read forum rules because(in this case):

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

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

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. [SOLVED] Counting the ranks in a company without duplicates, multiple conditions
    By nickmessick1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 01:14 PM
  2. Compare multiple columns and delete duplicates
    By labrooy in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-03-2011, 08:02 PM
  3. Delete is multiple conditions are met
    By Poulan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2010, 01:42 PM
  4. Flagging Duplicates based on Multiple conditions
    By e4excel in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 11-25-2008, 09:09 PM
  5. Delete multiple instances of duplicates
    By opg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2008, 03:48 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