+ Reply to Thread
Results 1 to 3 of 3

Delete both rows if data is duplicated

  1. #1
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Delete both rows if data is duplicated

    I have a worksheet with that I need to delete both rows if the data in one of the columns is the same. I know how to delete the duplicate row, but I need both rows deleted.

    Row A B C D E F
    1 IA 25011-1 8/31/2009 3 1.05 -3.15
    2 IA 25215-1 10/23/2009 3 0.32 -0.96
    3 PO 25464-2 10/23/2009 5 0.32 -1.6
    4 IA 25509-1 8/28/2009 8 0.6 4.8
    5 IA 25412-2 10/23/2009 10 0.32 -3.2
    6 IA 25599-2 9/16/2009 14 0.5 7
    7 PO 26081-3 10/6/2009 20 0.34 -6.8
    8 IA 25293 10/23/2009 66 0.32 -21.12
    9 PO 25397-2 10/23/2009 100 0.324 32.4
    10 PO F2237 5/13/2009 107 0.782 -83.67
    11 IA GF2237 5/13/2009 107 0.782 83.67
    12 PO G261126 9/30/2009 141 0.34 47.94
    13 IA 26112-6 10/6/2009 141 0.34 -47.94


    From the example above I would want Rows 1,2 and 10,11 and 12,13 deleted based on the data in column D

    Thanks for any help or sugestions.
    Last edited by thillis; 10-28-2009 at 09:23 AM.

  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: Delete both rows if data is duplicated

    Please Login or Register  to view this content.

    Add a column G formula to properly flag the duplicates. If duplicates are always adjacent, that would be a different formula than if they were scattered.

    This macro uses that technique, but only for adjacent duplicates:
    Please Login or Register  to view this content.
    _________________
    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!)

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Delete both rows if data is duplicated

    Hi, Based on Column "D" Dups Try this:-
    Please Login or Register  to view this content.
    Regards Mick

+ 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