+ Reply to Thread
Results 1 to 3 of 3

Remove rows with unique cell, keep duplicates/triples - BUT only if data in next column...

  1. #1
    Registered User
    Join Date
    02-07-2013
    Location
    At, Home
    MS-Off Ver
    Excel 2010
    Posts
    2

    Remove rows with unique cell, keep duplicates/triples - BUT only if data in next column...

    I am not sure this is even possible. Example will serve better than my long-winded explanation:

    COL A is a number of varying length that can have duplicates in other rows. I sort by smallest to largest so duplicates stack on each other for easier viewing
    COL B is a two character code of either TC or IN.

    Current Data:
    COL A COL B
    4485402 IN
    5164902 IN
    5213901 IN
    5213901 TC
    5248001 IN
    5345803 TC
    5345803 TC
    5345803 TC
    5395501 TC
    5468201 IN
    5588206 IN
    5674004 IN
    5717903 IN
    5900103 IN
    5947110 IN
    6230103 IN
    6304005 IN
    6444402 IN
    6444402 TC
    6557501 TC
    6565805 IN
    6565805 TC
    6626801 TC
    6666705 IN
    6707901 IN
    6777802 IN
    6839904 IN
    6839904 TC
    6839904 TC
    6839904 TC
    6839904 TC
    7086101 IN
    7093204 IN
    7109401 IN
    7149609 IN
    7301804 IN
    7370904 TC

    I am being asked to keep the rows with duplicates in COL A - keep BOTH rows BUT ONLY if one of the rows has IN and TC in COL B. So, COL A may have 3 or 4 or even 5 rows with duplicate numbers, but if all duplicates have a TC in COL B, I don't want any of them. I need only the 2 rows to remain - Duplicates in COL A and one of each, TC and IN in COL B.



    Desired Result: Keep rows in GREEN, Remove rows in RED.
    Current Data:
    COL A COL B

    4485402 IN
    5164902 IN


    5213901 IN
    5213901 TC


    5248001 IN
    5345803 TC
    5345803 TC
    5345803 TC
    5395501 TC
    5468201 IN
    5588206 IN
    5674004 IN
    5717903 IN
    5900103 IN
    5947110 IN
    6230103 IN
    6304005 IN

    6444402 IN
    6444402 TC

    6557501 TC

    6565805 IN
    6565805 TC

    6626801 TC
    6666705 IN
    6707901 IN
    6777802 IN

    6839904 IN
    6839904 TC

    6839904 TC
    6839904 TC
    6839904 TC
    7086101 IN
    7093204 IN
    7109401 IN
    7149609 IN
    7301804 IN
    7370904 TC


    If there is someone able to help - words will not be able to express the gratitude...

    Thanks for looking and FOR HELPING!!!!

    (Oh - and the searching I did in this forum led me to a bunch of posts with 'code' in them - I have no idea how to use that - but I am willing to learn!) Thanks again!

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Remove rows with unique cell, keep duplicates/triples - BUT only if data in next colum

    Try the attached
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-07-2013
    Location
    At, Home
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Remove rows with unique cell, keep duplicates/triples - BUT only if data in next colum

    THANK YOU - THANK YOU! and again...THANK YOU!

    I will get this into my original spreadsheet and give it a go - THANK YOU!!!

+ 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