+ Reply to Thread
Results 1 to 4 of 4

Duplication remove with criteria

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Duplication remove with criteria

    Hello follow forumers!!!

    I need some help!! I am probably overthinking this and that is why I can't figure our how to either create the necessary formula or VBA coding to achieve my desired output, but think VBA is probably going to give me the final output I really want. So here is the deal...I have a data set that contains duplicate records. I could have an asset that has 2 or more records of data within this data set. It could be an OEM repair or an In House repair. I want to search row by row through each duplicate and if the oldest record has a repair type of In House repair, then delete that record and move on to the next record in the data set.

    I have attached the data set I am working with...any ideas would be extremely helpful!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 2016 (Windows)
    Posts
    5,152

    Re: Duplication remove with criteria

    Insert two new columns at column A, so that your dates are in C and you have a blank column A and B.

    In A2, array-enter (enter using Ctrl-Shift-Enter instead of just Enter) the formula

    =MIN(IF(G:G=G2,C:C))

    Then in B2, enter the formula

    =IF(C2=A2,IF(D2="In House Repair","Delete",""),"")

    Copy A2:B2 down to match your data table, and re-calc (Ctrl-Alt-F9)

    Then filter to show "Delete" in column B, and delete all the rows where B = "Delete". And then remove the filters, delete column A and B, and you're done.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Duplication remove with criteria

    That does not appear to be calculating all of the data criteria correctly. I am still seeing records that should be marked as "Delete" but are blank. Something is off and I can't figure out what or how to fix it.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 2016 (Windows)
    Posts
    5,152

    Re: Duplication remove with criteria

    If you have values in G that have extra spaces or slight misspellings, then that could cause an issue. If you have a small set of data that the formula is not working correctly with, post it.

+ 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] Count Without Duplication Multiple Criteria
    By chadmott in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-27-2016, 10:22 AM
  2. [SOLVED] Remove row containing criteria from a list - not static criteria
    By Student1990 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2014, 10:29 AM
  3. Replies: 2
    Last Post: 04-09-2014, 03:05 PM
  4. Remove Duplicates with Criteria
    By cowtipper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2013, 05:40 PM
  5. Remove duplication and sort a string
    By TimN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2008, 06:18 PM
  6. [SOLVED] Remove Duplication from Validation List?
    By kk_oop@yahoo.com in forum Excel General
    Replies: 1
    Last Post: 01-16-2006, 10:30 PM
  7. [SOLVED] Remove duplication from validation list?
    By kk_oop@yahoo.com in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-16-2006, 10:20 PM

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