+ Reply to Thread
Results 1 to 5 of 5

clean email addresses (function mid, find, left, len)

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    clean email addresses (function mid, find, left, len)

    Hi,

    I tried to search on the forum or do it by myself but I guess my searching and vba skills are not good enough.
    I don't know if I chose a right title to explain my problem but anyway, here it is. I have a spreadsheet with

    A1 <a href="mailto:toto@vbanoob.com">toto@vbanoob.com</a>
    A2 <a href="mailto:tata@vbanoob.com">tata@vbanoob.com</a>
    A3 <a href="mailto:titi@vbanoob.com">titi@vbanoob.com</a>
    A4 <a href="mailto:tutu@vbanoob.com">tutu@vbanoob.com</a>
    etc.

    I did in Excel
    =MID(A1,FIND(">",A1)+1,100)
    to get toto@vbanoob.com</a> and
    =LEFT(A1,LEN(A1)-4)
    to get my good email address

    I would like to make a VBA function as I will have several list like that to clean.

    Thanks.

    Flo
    Last edited by FFlo; 08-05-2012 at 11:35 PM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: clean email addresses (function mid, find, left, len)

    Heres a Function that you can use

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: clean email addresses (function mid, find, left, len)

    Thank you Mike. Works like a charm.

    I don't know how to make it automatic for a range in VBA. I tried that but it was a total failure.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: clean email addresses (function mid, find, left, len)

    Loop thru the range, something like this.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-02-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: clean email addresses (function mid, find, left, len)

    Thank you Mike for sharing your expertise with a newbie like me. That works perfectly. Cheers !

+ 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