+ Reply to Thread
Results 1 to 8 of 8

How can I extract email addresses within text

  1. #1
    Registered User
    Join Date
    10-14-2015
    Location
    norfolk,uk
    MS-Off Ver
    2010
    Posts
    8

    Red face How can I extract email addresses within text

    I have email addresses within long text strings in cells which I need to extract - the email address can be anywhere in the string but can be identified by the @ then a space before the start and a space after eg: from the below example:

    asdfh ald lksdfh aldjk [email protected] aksdfh alkjdh need [email protected]
    akdflajds hflakjhdflkahsdkh [email protected] asdkfh aksdh faldj need [email protected]
    asdkhf alksdjh fa [email protected] ksdhf askdjh faldj need [email protected]

    Can anyone kindly point me in the direction to extract the email addresses on its own into a new cell?

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How can I extract email addresses within text

    Hi and welcome to the forum.

    So the example string you give is all contained within a single cell? And are there linebreaks within that cell?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    10-14-2015
    Location
    norfolk,uk
    MS-Off Ver
    2010
    Posts
    8

    Re: How can I extract email addresses within text

    No sorry each is on a separate row - so in A1 I have the string 'asdfh ald lksdfh aldjk [email protected] aksdfh alkjdh' so in B1 I would like to extract [email protected] the next example is in A2 on a separate row, the third example in A3 etc - there are therefore no linebreaks
    Last edited by sueryan13; 10-14-2015 at 09:43 AM.

  4. #4
    Registered User
    Join Date
    08-04-2015
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    82

    Re: How can I extract email addresses within text

    Try this...
    =TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND(" ",A1&" ",FIND("@",A1))-1)," ",REPT(" ",LEN(A1))),LEN(A1)))
    Note - if you have more than 1 email address in same cell..it will extract the first email address...

  5. #5
    Registered User
    Join Date
    10-14-2015
    Location
    norfolk,uk
    MS-Off Ver
    2010
    Posts
    8

    Re: How can I extract email addresses within text

    that is fantastic you are very helpful.

    I have just noticed that some email addresses have a colon : at the beginning not a space - I don't suppose you can search for a : or a space?????

  6. #6
    Registered User
    Join Date
    10-14-2015
    Location
    norfolk,uk
    MS-Off Ver
    2010
    Posts
    8

    Re: How can I extract email addresses within text

    Please forget the last question, I can do that myself but I have one other if thats OK?

    If I have text in a cell A1 with lets say ABC on the end that I do not want how can I get the text without the ABC. The lengths of the strings will very.

    So

    a sueabc I want sue
    b fredbc I want fred
    c georgeabc I want george

    This is my last question.

  7. #7
    Registered User
    Join Date
    08-04-2015
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    82

    Re: How can I extract email addresses within text

    Quote Originally Posted by sueryan13 View Post
    Please forget the last question, I can do that myself but I have one other if thats OK?

    If I have text in a cell A1 with lets say ABC on the end that I do not want how can I get the text without the ABC. The lengths of the strings will very.

    So

    a sueabc I want sue
    b fredbc I want fred
    c georgeabc I want george

    This is my last question.
    May be u can replace it with blank by Ctrl+H..( Replace ABC with blank)..hope this helps..

  8. #8
    Registered User
    Join Date
    08-04-2015
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    82

    Re: How can I extract email addresses within text

    Hii sueryan13

    If u got ur solution,,..can u pls mark this thread has solved and u can also add Reputation for those who have helped....
    Thank You...
    You can add reputation(s) of those who helped

+ 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 matching first name from unformatted email addresses
    By gmcelroy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-08-2015, 03:26 AM
  2. Replies: 5
    Last Post: 08-05-2013, 11:14 AM
  3. need to extract email addresses from excel files
    By dunndealpr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-07-2013, 06:03 AM
  4. [SOLVED] Extract Email Addresses
    By amicman in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-06-2013, 04:33 PM
  5. Extract email addresses from hyperlinks
    By artsy in forum Excel General
    Replies: 1
    Last Post: 11-10-2011, 09:37 AM
  6. Extract Email Addresses From Excel
    By blacksunseven in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2007, 05:48 AM
  7. How to extract email addresses to new column
    By Inquirer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2006, 04:30 PM

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