dcsimg
Results 1 to 3 of 3

Thread: Deleting Duplicate Rows based on

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    8

    Deleting Duplicate Rows based on

    Hey all,

    I have an excel book and want to write a macro that will look through it, find duplicates in the rows and delete that row if duplicates exist in columns 2 to 6 only if column 1 of the same row contains nothing. at the moment im trying:

    Code:
    Sub Macro1()
        Columns("B:F").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
            Columns("A:A") = "", Unique:=True
    But i keep getting a mismatch on the Columns("A:A") = ""

    Does anyone know if there is a why to do this?

    A quick example of what i would like to output is this:

    A B C D E F

    1 Be Te OI HU KJ
    Be Te OI HU KJ
    2 BB FY SD U
    1 Be Te OI HU KJ

    Output of:

    A B C D E F

    1 Be Te OI HU KJ
    2 BB FY SD U
    1 Be Te OI HU KJ

    Any help greatly appreciated

    Excel 2002

  2. #2
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Deleting Duplicate Rows based on

    You have shown a 'duplicate' row that is adjacent to its match. Is that always the case, or do you have to use the universal situation where the 'match' can be anywhere in the list? Can you sort the list (on column 2?) so that duplicates will always be adjacent? That would make the logic much easier.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    8

    Re: Deleting Duplicate Rows based on

    Thanks for the reply but no loner taking this approach

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width