+ Reply to Thread
Results 1 to 9 of 9

VBA that extracts all email address from a excel workbook

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    5

    VBA that extracts all email address from a excel workbook

    Does anyknow how to do it?
    I have a workbook with about 11 sheets, with a total of about a million or so lines. All the emails are contained within the first column, and they are in this format:
    email,randomText,randomText
    I am looking for a way to just extract the email out and output it into perhaps a new excel document?
    If someone can help me in this it will be great.
    Thank you so much!

  2. #2
    Registered User
    Join Date
    05-30-2012
    Location
    St Paul, MN
    MS-Off Ver
    2010
    Posts
    51

    Re: VBA that extracts all email address from a excel workbook

    So, in cell A2, you might have something like
    [email protected], blah blah, blah blah blah?
    Where there's always a comma after the email address?

    If so, you can use a formula like this:
    Please Login or Register  to view this content.
    in an empty column to get the addresses.

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA that extracts all email address from a excel workbook

    Yes, from Cell A1-A100000, the format is always like this:
    [email protected],blahblah,blahblah
    I just need a way to extract that out. Is it possible for you to give me a code which I can do this? I am not experienced with VBA

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    St Paul, MN
    MS-Off Ver
    2010
    Posts
    51

    Re: VBA that extracts all email address from a excel workbook

    You can just use that formula above. If necessary, you can copy/paste special - values the result back on top of column A. No VBA needed.

  5. #5
    Registered User
    Join Date
    10-30-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA that extracts all email address from a excel workbook

    Ah yea it works. But that means I will ahve to replace the number in slowly, so like
    =LEFT(A1,FIND(",",A1)-1)
    =LEFT(A2,FIND(",",A2)-1)
    etc
    Is there anyway for me to just make it apply to the whole column? I tried double clicking the black square at the bottom right of the box but it doesn't work

  6. #6
    Registered User
    Join Date
    05-30-2012
    Location
    St Paul, MN
    MS-Off Ver
    2010
    Posts
    51

    Re: VBA that extracts all email address from a excel workbook

    If it doesn't fill down with a double click, you can click and drag, or you can do a ctrl-c (copy), select the cells you want the updated formula to be in, and then ctrl-v (paste) the formula.

  7. #7
    Registered User
    Join Date
    10-30-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA that extracts all email address from a excel workbook

    I tried to click and drag, and double click. The ctrl-C just copies the exact formula into the next box :\

  8. #8
    Registered User
    Join Date
    05-30-2012
    Location
    St Paul, MN
    MS-Off Ver
    2010
    Posts
    51

    Re: VBA that extracts all email address from a excel workbook

    On the spreadsheet, do you see the formula, or the result of the formula?

  9. #9
    Registered User
    Join Date
    10-30-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA that extracts all email address from a excel workbook

    Never mind haha, I managed to get it to work. Thanks a lot for your 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