+ Reply to Thread
Results 1 to 5 of 5

Extract Mail Address from String

  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Extract Mail Address from String

    Here is what I need to happen.

    I have this text (1000's of them, but same format) in a column:

    Tim Queen (tim.queen.jrtd@crazymail.com)

    I need to remove the name "Tim Queen" from the beginning and remove the "(" & ")". I want to be left with just the email address.

    How can I do this for 1000's of names at one time?
    Last edited by DonkeyOte; 01-15-2010 at 01:21 PM.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Help me create a formula

    Hi

    Assuming your email in A1 try:

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"(",REPT(" ",100)),")",REPT(" ",100)),100,100))

    and copy down.

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Help me create a formula

    fastrack1,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    On this occasion I have modified for you - going forward please endeavour to follow the above guidelines.

  4. #4
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Extract Mail Address from String

    hi all,

    Here's a little something I've been playing with recently to help extract emails from messy database dumps which may have the emails in a number of separate columns etc.

    It is "work in progress" & needs to be optimised (esp the Redim within a loop & perhaps to use a paramarray) but I thought I would post it "as is" since it ties in with the subject of this thread (thanks to DO's editing)

    Please Login or Register  to view this content.
    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  5. #5
    Registered User
    Join Date
    01-15-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Help me create a formula

    Quote Originally Posted by RichardSchollar View Post
    Hi

    Assuming your email in A1 try:

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"(",REPT(" ",100)),")",REPT(" ",100)),100,100))

    and copy down.

    Richard
    Richard, thanks so much!! It worked great and has saved this ignorant soul from a ton of work

+ 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