+ Reply to Thread
Results 1 to 8 of 8

Extracting the Middle Initial/Middle Name

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Fort Myers, Florida
    MS-Off Ver
    Excel 2017
    Posts
    29

    Extracting the Middle Initial/Middle Name

    Hello and thanks for reading my post.

    I am a column (I) of names that have peoples names in them. Some have just their first and last name, some middle initial, and some their full middle name. Is there a formula that would take out the middle name/initial if they had one. Here are some examples

    John Anderson (no middle name - want to keep this as is)
    John B Anderson (Middle Initial - want to get rid of the B)
    John Bernard Anderson (Middle Name - Want to get rid of Bernard)

    The format for the names are exactly like the examples. First name - Middle name/initial if they have on - Last Name

    Thanks for your help

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Extracting the Middle Initial/Middle Name

    Hi - Did you try using Text - to -Columns:

    Select your data and then follow:

    Press ALT + D + E
    Select " delimited"
    Check "Space "
    Finish


    Assuming your data is in column A, upon using Delimiters it would get broken down into columns A, B and C. Using the below formula in cell D1, you can achieve what you aimed:

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

    Hope this helps.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    Fort Myers, Florida
    MS-Off Ver
    Excel 2017
    Posts
    29

    Re: Extracting the Middle Initial/Middle Name

    Thanks kbkumar, I was going to use that as my final hoorah if there wasn't a formula that would remove the middle names if there was one.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Extracting the Middle Initial/Middle Name

    Try this, it returns the first and last word in any string.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Fort Myers, Florida
    MS-Off Ver
    Excel 2017
    Posts
    29

    Re: Extracting the Middle Initial/Middle Name

    You were right on the money. Thanks Marcol, that worked awesom. I do have a quick question if you don't mind, what does the "|" represents or used here for?

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Extracting the Middle Initial/Middle Name

    It's just a marker, any character unlikely to be found in the string can be used.

    Here we are replacing the last space, " ", in the string with pipe, "|". Then we search for "|" within that new string.

    This gives us the number of spaces in the string.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Marcol; 11-16-2012 at 10:39 AM.

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Extracting the Middle Initial/Middle Name

    Another way..

    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Extracting the Middle Initial/Middle Name

    Go with Star of the Month (July) I wasn't thinking clearly! ...

+ 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