+ Reply to Thread
Results 1 to 6 of 6

Remove spaces and middle name in email address

  1. #1
    Forum Contributor
    Join Date
    08-16-2009
    Location
    Sheffield
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    118

    Remove spaces and middle name in email address

    Hi,

    I have a list of email address that has been provided incorrectly with a middle name and space included.

    Is there a formula that could remove the space and middle name but leave forename and Surname note the all names start with capital letters which may help to identify and arrange data, example.

    Fred PaulSmith@xyz.com should read FredSmith@xyz.com ( removal of middle name the space and 'Paul')
    Kim AngelaBrown@xyz.com should read KimBrown@xyz.com ( removal of middle name the space and 'Angela')

    Many thanks
    G

  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: Remove spaces and middle name in email address

    Hi.

    Do all addresses have a middle name?

    Regards
    Click * below if this answer helped

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

  3. #3
    Forum Contributor
    Join Date
    08-16-2009
    Location
    Sheffield
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    118

    Re: Remove spaces and middle name in email address

    Hi,

    Good point, not all them, my list of emails has a mix of good emails that do not need change and approx 30% have the unwanted space and middlename.

    Hope this helps
    G

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

    Re: Remove spaces and middle name in email address

    Try this:

    =IF(SUMPRODUCT(0+(ABS(77.5-CODE(MID(LEFT(A1,FIND("@",A1)),ROW(INDEX(A:A,1):INDEX(A:A,FIND("@",A1))),1)))<13))=3,REPLACE(A1,FIND(" ",A1),1+MATCH(TRUE,INDEX(ABS(77.5-CODE(MID(A1,FIND(" ",A1)+ROW(INDEX(A:A,2):INDEX(A:A,FIND("@",A1))),1)))<13,,),0),""),SUBSTITUTE(A1," ",""))

    Copy down as required.

    Regards

  5. #5
    Forum Contributor
    Join Date
    08-16-2009
    Location
    Sheffield
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    118

    Re: Remove spaces and middle name in email address

    Hi,

    Many thanks for your speedy response and just what I was looking for.

    Thanks again.

    G

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

    Re: Remove spaces and middle name in email address

    You're welcome!

    Regards

+ 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. [SOLVED] Outlook VBA remove specific email address from ReplyAll message
    By good4un2u in forum Outlook Programming / VBA / Macros
    Replies: 8
    Last Post: 06-09-2015, 10:36 AM
  2. [SOLVED] Take partial cell data and insert into the middle of a preformatted email address(?)
    By irishtrey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:04 AM
  3. Need a formula to remove an email address from a long string of text.
    By Luke Andrews in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-02-2013, 08:03 PM
  4. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  5. Parse Email address from middle of a string
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2011, 09:17 PM
  6. Replies: 1
    Last Post: 01-06-2006, 03:23 PM
  7. [SOLVED] How do I remove all text to the left of the @ in an email address
    By David M in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2005, 04:06 PM

Tags for this Thread

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