+ Reply to Thread
Results 1 to 5 of 5

Delete a Cell in Worksheet1 That Appears in Worksheet2

  1. #1
    Registered User
    Join Date
    04-27-2008
    Posts
    11

    Delete a Cell in Worksheet1 That Appears in Worksheet2

    I have a list of emails in column A of worksheet1. I have a master list of emails in several columns of worksheet2. I'm trying to figure out a macro to delete emails from worksheet1 that appear in worksheet2 - basically I wish to delete the row the email is sitting on. I found one macro that only compared one column with another but have not found anything that compares two worksheets, Is there someone that can help me out?

    Thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Delete a Cell in Worksheet1 That Appears in Worksheet2

    Post a sample workbook.
    When you are in Advanced reply, click on the paperclip to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    04-27-2008
    Posts
    11

    Re: Delete a Cell in Worksheet1 That Appears in Worksheet2

    Here's the macro that compared column A of worksheet1 with column A of worksheet2. If only I could amend this to compare to all columns of worksheet2.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 10-22-2012 at 08:21 PM. Reason: Code tags required when showing VBA code, please read the forum rules

  4. #4
    Registered User
    Join Date
    04-27-2008
    Posts
    11

    Re: Delete a Cell in Worksheet1 That Appears in Worksheet2

    Oops. Missed your reply. I'll send a workbook shortly.

  5. #5
    Registered User
    Join Date
    04-27-2008
    Posts
    11

    Re: Delete a Cell in Worksheet1 That Appears in Worksheet2

    Hi again.

    I've attached a workbook. There are 40 emails in column A of sheet1 and 24 emails in the various columns of sheet2. There are 16 emails on sheet1 that do not appear in sheet2.

    In the real world, of course, the emails will be from all manner of domains.

    Thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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