+ Reply to Thread
Results 1 to 7 of 7

How to remove Middle Initials and Extra Space from Names : Office 365

  1. #1
    Registered User
    Join Date
    08-30-2022
    Location
    Santa Fe, NM
    MS-Off Ver
    365
    Posts
    6

    How to remove Middle Initials and Extra Space from Names : Office 365

    Help with Office 365: I'm new and learning formulas so I'd appreciate any help with this as well as any explanation or tutorials that were helpful with this problem.

    I can remove the "/" easily using the Find and Replace, so the concern is more how to tell excel I want to remove the last space and last character standing alone or character(s).


    Ex: TheMenace/ Dennis L becomes TheMenace Dennis
    or Hollywood/Jack III becomes Hollywood Jack


    (with no extra spaces at the end of the name). This is tricky since the characters might vary but generally it'd be a space and one or two characters.

    Thank you in advance, I have 10,000 lines to edit and this will save me so much time, I really appreciate it!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    There are so many "ifs" and "buts" and "except whens" in this sort of Q... we ABSOLUTELY need a representative sheet to play with. Read the yellow banner (top) about sample sheets. Act on its guidelines and upload one that MEETS the guidelines.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    No reply... so something that works with your limited sample of 2.

    =SUBSTITUTE(SUBSTITUTE(A2,"/"," "),TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A2,"/","")," ",REPT(" ",25)),25)),"")
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-30-2022
    Location
    Santa Fe, NM
    MS-Off Ver
    365
    Posts
    6

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    Hi Glenn,

    Thank you for your help. I created a sample to play with.

    Your formula works great, however in instances it has one middle initial character it removes that character from the Last and First name as well, however the error is not pressent if there are 2 initials?

    (See cells B2:B4)

    Thank you for your help, I really appreciate it!
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    better... My fave parsing function... FILTERXML.

    =TEXTJOIN(" ",,FILTERXML("<A><B>"&SUBSTITUTE(TRIM(SUBSTITUTE(A2,"/"," "))," ","</B><B>")&"</B></A>","//B[position()<3]"))
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-30-2022
    Location
    Santa Fe, NM
    MS-Off Ver
    365
    Posts
    6

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    Hi Glenn,

    THANK YOU!!!

    This is absolutely amazing, I really appreciate the help, it would have taken DAYS of hand typing and after I got to line 300 I figured I need to research and got stuck in errors with formulas. I really appreciate the help! Thank you again!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: How to remove Middle Initials and Extra Space from Names : Office 365

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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. How to eliminate the extra space if there is no middle initial
    By Georgem106 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2017, 12:24 PM
  2. [SOLVED] remove extra space after two words
    By parkkibum in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-05-2014, 09:00 AM
  3. Replies: 0
    Last Post: 07-26-2012, 03:54 PM
  4. Excel 2007 : Remove Extra Space
    By Jerseynjphillypa in forum Excel General
    Replies: 2
    Last Post: 11-08-2011, 12:09 PM
  5. New to VBA and Excel, need help splitting a name field and dumping extra middle names
    By Jonnymorris in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2008, 08:44 AM
  6. remove the space in the middle
    By christx in forum Excel General
    Replies: 3
    Last Post: 07-02-2007, 11:06 AM
  7. Replies: 1
    Last Post: 05-09-2005, 07:44 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