Results 1 to 3 of 3

Delete rows if any cell in Sheet 1 rows matches any cell in Sheet2 column

Threaded View

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    2

    Delete rows if any cell in Sheet 1 rows matches any cell in Sheet2 column

    Hi!

    I'm needing an Excel 2003 VBA macro that would perform the following:

    If any cell in Sheet1!A2:D2 matches any cell in Sheet2!B5:B7, then row Sheet1!A2:D2 is deleted;
    If any cell in Sheet1!A3:D3 matches any cell in Sheet2!B5:B7, then row Sheet1!A3:D3 is deleted;
    If any cell in Sheet1!A4:D4 matches any cell in Sheet2!B5:B7, then row Sheet1!A4:D4 is deleted;

    ...and so on, through...

    If any cell in Sheet1!A9:D9 matches any cell in Sheet2!B5:B7, then row Sheet1!A9:D9 is deleted;

    The remaining/resulting rows would be:

    Col1 Col2 Col3 Col4
    pizza red tim pork
    yellow green shrimp cheese
    dan purple tara white
    fish bread brown heather
    pink mary ryan teresa

    Thank you.
    Attached Files Attached Files

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