+ Reply to Thread
Results 1 to 5 of 5

Split up first and last name

  1. #1
    Registered User
    Join Date
    10-30-2008
    Location
    AL
    Posts
    27

    Split up first and last name

    I have a list of names. It is always in the format of:

    FirstName LastName

    I want to create a column that returns just the last name. Where it gets tricky is when some names are like this:

    FirstName LastName Jr.
    FirstName LastName III

    In those instances, I don't want the Jr. or the III, I still want just the last name.

    Any help?

    I've been using the formula =RIGHT(A1,LEN(A1)-FIND(" ",A1))
    But that doesn't work when the last name is followed by a Jr.

    Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split up first and last name

    How about:

    =TRIM(SUBSTITUTE(SUBSTITUTE(RIGHT(A1,LEN(A1)-FIND(" ",A1)),"Jr.",""),"III",""))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: Split up first and last name

    Another one:
    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Split up first and last name

    Since the first name and last name are always separated by the same deliminter, you can use this:

    =MID(A1,SEARCH(" ",A1)+1,LEN(A1)-LEN(SEARCH(" ",A1)))
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Split up first and last name

    Assuming you have no spaces amid first name references you should find something like the below will work irrespective of suffix

    =TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),1+LEN(A1),LEN(A1)))

    above assumes per first post that you're looking to strip the suffix should it exist

+ 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