+ Reply to Thread
Results 1 to 11 of 11

Deleting cell data in worksheet A if it exists in worksheets B, how?

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Deleting cell data in worksheet A if it exists in worksheets B, how?

    Probably easy for you guys.. but would love some help. I have a huge list of email addresses in worksheet A but need to remove unsubscribers from this list which all reside in worksheet B. In cell data is in email address form. How do i do this via excel?

  2. #2
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    you could avoid programming altogether and just do a countif formula. If the email address exists in sheet B then it will return a 1. You can then sort by all the 1's and delete?

    Unless you need a button to click to do this job?

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Is it possible to post file with dummy data which is in the same format.

  4. #4
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Quote Originally Posted by johncassell View Post
    you could avoid programming altogether and just do a countif formula. If the email address exists in sheet B then it will return a 1. You can then sort by all the 1's and delete?

    Unless you need a button to click to do this job?
    Thanks! Could you let me know what this countif formula would look like and I can replace the variables in the formula?

  5. #5
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Cant seem to attach it on here.. but it looks something like this:
    email addresses from sheet B needs to be removed from sheet A and other row details (eg. name and surname) to those corresponding email addresses should also be removed with the email addresses.

    SheetA:
    Name Surname username email address
    John Smith Smithers [email protected]
    Pete Tong Tongers [email protected]
    Sarah Meyer Smayo [email protected]
    Ken Costa Coffee [email protected]

    SheetB:
    [email protected]
    [email protected]

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Pl see attached file .Assumed Sheet B Has got heading.Pl feel free to clarify

    Run the macro in worksheet.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Hey, not sure how you did it, how can I replicate what you did with my real data?

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Really I could not follow what you want.Pl explain fully.
    The rows containing the unwanted Email address are deleted. You want only erase data?
    Be clear.Sorry for the trouble.
    Thanks.

  9. #9
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Hi, sorry, what I mean is .. how do I copy the macro you created to my worksheet with the actual data? Currently you worked on a dummy data sheet. Makes more sense?

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Pl copy only macro to your work book.Name the sheet containing email address as SheetB and other sheet as SheetA.Then run macro.If you want to run macro with different names pl inform I will change code so that you can enter the existing sheet names.
    Regards

  11. #11
    Registered User
    Join Date
    11-04-2011
    Location
    London, England
    MS-Off Ver
    Excel for Mac
    Posts
    6

    Re: Deleting cell data in worksheet A if it exists in worksheets B, how?

    Many thanks for your kind help!

+ 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