+ Reply to Thread
Results 1 to 5 of 5

Split a name string into first name , middle initial and last name

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Split a name string into first name , middle initial and last name

    I want to read in a name string that may be in several formats and from that extract the first name, middle initial and last name.
    Please see attached file for possible formats in the name column. Fields highlighted in yellow are the results I want to achieve through the formula.
    Thanks
    ShazName Formula.xls

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Split a name string into first name , middle initial and last name

    hi Lady_Shaz, try this in B2 copied down & across:
    =TRIM(SUBSTITUTE(MID(SUBSTITUTE(TRIM($A2)," ",REPT(" ",50)),1+(COLUMNS($B2:B2)-1)*50,50),",",""))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    12-03-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Split a name string into first name , middle initial and last name

    Hi benishiryo, thanks heaps that works however I have come across another problem.
    I am working with the data now and have found different name formats.
    Please see attached file with the new formats highlighted in pink.
    Cheers
    Shaz
    Name Formula.xls

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Split a name string into first name , middle initial and last name

    try this for the last name:
    =IF(ISNUMBER(SEARCH("(*)",A2)),REPLACE(A2,SEARCH("(*)",A2),100,""),LEFT(A2,FIND(",",A2)-1))
    then subsequently:
    =TRIM(SUBSTITUTE(MID(SUBSTITUTE(TRIM(REPLACE($A2,1,FIND(",",$A2),""))," ",REPT(" ",50)),1+(COLUMNS($B2:B2)-1)*50,50),",",""))

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Split a name string into first name , middle initial and last name

    Thanks so much for your help

+ 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