+ Reply to Thread
Results 1 to 6 of 6

extract email address from the cell if it matches one from the list

  1. #1
    Registered User
    Join Date
    07-09-2013
    Location
    Poland
    MS-Off Ver
    excel 2007
    Posts
    85

    extract email address from the cell if it matches one from the list

    Hi,
    i have a problem with my macro project. With help of the colleagues from the forum i have a macro that deletes the certain domain name from the cells in column 1...i would like to have the other way around.

    What i need is the macro to look through the column A and find email adresses with the domain name from the list. If it finds it should only take the actual email address that matched the domain from the list, and copy it to next column.
    Please look on the example in the attachment

    If it would help here is macro that i have in the first place:
    Please Login or Register  to view this content.
    THANKS A LOT FOR ALL THE HELP
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: extract email address from the cell if it matches one from the list

    Try this to see if this works as per your requirement.
    Please Login or Register  to view this content.
    Please find the attached sheet and click on the Green Button on Test Sheet to get the desired output in col. B.
    Attached Files Attached Files
    Last edited by sktneer; 10-20-2014 at 08:09 AM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    07-09-2013
    Location
    Poland
    MS-Off Ver
    excel 2007
    Posts
    85

    Re: extract email address from the cell if it matches one from the list

    Hi Sktneer,
    That works just like i would want. The only thing is that there could be a very long list of the domains that could be extracted from the column. I wonder if its possible to take the variables email1, email2 and so on from the particular list.

    But without a doubt thats the idea and it works perfectly.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: extract email address from the cell if it matches one from the list

    Try this code. The code assumes that the col. G contains the domain list starting from G2.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sktneer; 10-20-2014 at 09:24 AM.

  5. #5
    Registered User
    Join Date
    07-09-2013
    Location
    Poland
    MS-Off Ver
    excel 2007
    Posts
    85

    Re: extract email address from the cell if it matches one from the list

    Hi Sktneer,
    That works brilliant - much appreciated. Great skills You have.

    Thank You very much !

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: extract email address from the cell if it matches one from the list

    You're welcome. Glad I could help.
    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation if the solution provided helped you. This is another way to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extract email address from eml files
    By lovinguy in forum Outlook Formatting & Functions
    Replies: 5
    Last Post: 02-08-2024, 05:31 AM
  2. [SOLVED] extract email address
    By anilg0001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2013, 12:05 AM
  3. Extract a domain name from an email address
    By kpratico in forum Excel General
    Replies: 4
    Last Post: 01-01-2013, 08:43 PM
  4. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  5. Extract email address and copy into .To field
    By eckert1961 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2009, 11:39 AM

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