+ Reply to Thread
Results 1 to 7 of 7

Duplication removal with condition...please help, I don't have much time left...

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    9

    Duplication removal with condition...please help, I don't have much time left...

    Hello all

    I have a sheet with more than 14K lines and 25 columns of data.
    In column A I have case numbers which is NOT unique.
    Some of the case numbers in column A have a blue background color (Fill Color) and some have no background color.

    I have sorted the entire sheet after the case numbers in column A and have the biggest numbers on top.
    Now I have lots of lines with the same case numbers repeated after each other where some lines have blue fill color and some have white background color (no fill color).

    I would love to compare the lines one by one and find the duplicate case numbers. Once a duplicate case number is found and IF the fill color is white, empty the cell or remove the row. And if the duplicates fill color is blue, do nothing and go to the next cell.

    Hope you gods out there can help me out. Thanks a ton for any help.
    I’m running out of time, please help.
    Thanks again

  2. #2
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Duplication removal with condition...please help, I don't have much time left...

    Use a header andcreate a column next to a insert an if statement = In B2 write, =IF(A2=A3,"True",If(B1="True",If(A1=A2,"True","False")). Then bring the formula to the bottom of the range. All the Trues will be dups.

  3. #3
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Duplication removal with condition...please help, I don't have much time left...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Sorry this is the formula. I was sleeping at the wheel

  4. #4
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Duplication removal with condition...please help, I don't have much time left...

    Or if you are really into it you could do a pivot table and Pivot on the Case numbers and use the count case numbers in the pivot table. Copy and paste special values on the pivot table. Remove any rows with a count of 1 and then you would know how many duplicate Cases you had. If you wanted to examine them individually then you could do a vlookup back to the worksheet with all of the data. Any result that was an #N/A was not a dup.

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Duplication removal with condition...please help, I don't have much time left...

    thanks for the code, it was very nice of you. however your code doesn't look at the fill color. how can i get the rows with no fill color deleted.

    thanks again for all your help.

  6. #6
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Duplication removal with condition...please help, I don't have much time left...

    Hi, if you are just interested in removing duplicates why don't you use the remove duplicates function on the data ribbon.

  7. #7
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Huntsville, AL
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Duplication removal with condition...please help, I don't have much time left...

    Or you could use an auto-filter on the color blue use ctrl+shift+ down arrow and select delete entire row from the ribbon.

+ 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] Duplication removal in cells!!!
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2013, 10:18 AM
  2. Replies: 4
    Last Post: 04-10-2012, 08:30 AM
  3. [SOLVED] Find first left condition and return a corresponding cell value
    By JohannesFust in forum Excel General
    Replies: 10
    Last Post: 04-10-2012, 06:27 AM
  4. Duplication data every time macro is run, instead of updating newly found data only
    By Lostinxcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2010, 03:41 AM
  5. Run-Time Macro duplication error
    By gretz06 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2009, 08:37 AM

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