Delete Row if Certain Data Matches

  • I have a very large spreadsheet that has several rows of data that are duplicates of other rows, except for data in one cell.


    For example,
    A B C D E [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 152"]Badge Type: Badge Name[/TD]
    [TD="width: 80"]Is a Young Lawyer Member[/TD]
    [TD="width: 71"]Customer Number[/TD]
    [TD="width: 71"]Full Name[/TD]
    [TD="width: 71"]Firm Name[/TD]

    [/tr]


    [tr]


    [td]

    test 1

    [/td]


    [TD="align: right"]0[/TD]
    [TD="align: right"]391026[/TD]

    [td]

    first name1

    [/td]


    [td]

    last name 1

    [/td]


    [/tr]


    [tr]


    [td]

    test 2

    [/td]


    [TD="align: right"]1[/TD]
    [TD="align: right"]118004[/TD]

    [td]

    first name 2

    [/td]


    [td]

    last name 2

    [/td]


    [/tr]


    [tr]


    [td]

    test 3

    [/td]


    [TD="align: right"]0[/TD]
    [TD="align: right"]64096[/TD]

    [td]

    first name3

    [/td]


    [td]

    last name 3

    [/td]


    [/tr]


    [tr]


    [td]

    test 4

    [/td]


    [TD="align: right"]0[/TD]
    [TD="align: right"]500461[/TD]

    [td]

    first name4

    [/td]


    [td]

    last name 4

    [/td]


    [/tr]


    [tr]


    [td]

    test 5

    [/td]


    [TD="align: right"]0[/TD]
    [TD="align: right"]500461[/TD]

    [td]

    first name 4

    [/td]


    [td]

    last name 4

    [/td]


    [/tr]


    [/TABLE]


    I would like a formula or macro that will find the match C4 & C5 and then delete the entire row C5.


    There are many instances where there are between 3-6 additional rows that have this type of duplicated data.


    Thank for any help or suggestions.


    Eric

  • Hello and Welcome to the Forum ...:smile:


    When it comes to a very large database ....deleting rows should not be performed with a Loop ...


    but with adequate solutions such as AutoFilter, etc ...


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!