Closed Thread
Results 1 to 9 of 9

Remove middle name for end of a name string

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    Remove middle name for end of a name string

    I have a column that is formatted as:
    FirstName, LastName MiddleName/MiddleInitial

    I am trying remove the middle name or middle initial from the string. Basically remove everything after the second comma or after second space in string. Thanks in advance for any assistance.

    Example cells as follows:
    Blassingham, James H., III
    Bleke, Michael L
    Bradford, William, Jr
    Brogin, Ira
    Bunsa, Robert J., Jr

    Desired output is as follows:
    Example cells as follows:
    Blassingham, James
    Bleke, Michael
    Bradford, William
    Brogin, Ira
    Bunsa, Robert
    Last edited by maacmaac; 07-06-2011 at 04:01 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove middle name for end of a name string

    Try:

    =IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))=1,A1,SUBSTITUTE(LEFT(A1,FIND("^^",SUBSTITUTE(A1," ","^^",2))-1),",","",2))

    where A1 has first original name...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    Re: Remove middle name for end of a name string

    Perfect. Thanks for solution.

  4. #4
    Registered User
    Join Date
    12-15-2014
    Location
    Vancouver
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Remove middle name for end of a name string

    Sorry, but what does ^^ mean in a formula? What is it looking for? Thanks!

  5. #5
    Registered User
    Join Date
    04-27-2021
    Location
    New York
    MS-Off Ver
    365
    Posts
    16

    Re: Remove middle name for end of a name string

    Just saw this thread and it helped me as well; Thank you NBVC!

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,478

    Re: Remove middle name for end of a name string

    Here is a shorter formula that will also work...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and here is an even shorter formula that will also work as well...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-27-2021
    Location
    New York
    MS-Off Ver
    365
    Posts
    16

    Re: Remove middle name for end of a name string

    Thank you, Rick!

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

    Re: Remove middle name for end of a name string

    Hi, I'm working in Office 365 and tried copying all 3 formulas listed above and nothing is working. I'm still learning, can someone help me with a formula that will do the above in 365?

    I've tried using LEN and LEFT but I'm still learning formulas. (any explanation would be most appreciated as well).

    Thank you!
    Attached Images Attached Images

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,695

    Re: Remove middle name for end of a name string

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

Closed 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