+ Reply to Thread
Results 1 to 17 of 17

How do you split last names and two-part first names from one cell?

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Unhappy How do you split last names and two-part first names from one cell?

    Our office has a list of some thousands of names written like this..

    Smith, Rebbecca Carter
    Doe, Jane Smith
    Bacon, Dan Parker
    Crawford, Sara Lopez

    that I have to separate into cells for Last Name | First Name | Middle Name

    my problem is when it is a two-part first name.

    Fisher, Mary Anne Castro

    What is a universal formula that can be used for all these names and get the correct split data?

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do you split last names and two-part first names from one cell?

    Is the last name always separated from the rest with a "," ?
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How do you split last names and two-part first names from one cell?

    Please let us know what is the expected output of the above example


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do you split last names and two-part first names from one cell?

    Yes, dredwolf. The Last name is ALWAYS separated by a comma ",".

    Quote Originally Posted by dredwolf View Post
    Is the last name always separated from the rest with a "," ?

  5. #5
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do you split last names and two-part first names from one cell?

    A2: Fisher, Mary Anne Castro
    A3: Fisher
    A4: Mary Anne
    A5: Castro

    Quote Originally Posted by :) Sixthsense :) View Post
    Please let us know what is the expected output of the above example

  6. #6
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: How do you split last names and two-part first names from one cell?

    Hi

    Im not sure you can, hopefully Im wrong and someone will correct me the only way I know to do it is text to columns and then manually adjust the two parters.

    Chris
    Click my star if I helped Thanks

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How do you split last names and two-part first names from one cell?

    i think that's better Chris than using formulas

    with regards to formulas try this two first if you have problem with the last one revert to text-to-column

    =TRIM(LEFT(A2,FIND(",",A2)-1))

    =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99))
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do you split last names and two-part first names from one cell?

    It is do-able, it's just going to take me some time to come up the formulas...string manipulation is NOT my strong suit...
    Hopefully, someone a little better will come up with a solution before I finally muddle my way through it !

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How do you split last names and two-part first names from one cell?

    In A2 cell
    Fisher, Mary Anne Castro

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


    Drag it down...

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How do you split last names and two-part first names from one cell?

    it depends on the names...

    eg.

    Fisher, Mary Anne De Castro

    Fisher, Mary Anne Joy Castro

    Fisher, Mary De Castro

  11. #11
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How do you split last names and two-part first names from one cell?

    Hi,

    Find 3 formulas that do what you ask in the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  12. #12
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do you split last names and two-part first names from one cell?

    How about the two-part first names though?

  13. #13
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How do you split last names and two-part first names from one cell?

    Check my answer.

  14. #14
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do you split last names and two-part first names from one cell?

    a3
    =TRIM(LEFT(A2,FIND(",",A2)-1))
    a4
    =IFERROR(SUBSTITUTE(LEFT(SUBSTITUTE(TRIM(MID(A2,FIND(",",A2)+1,999))," ","*",1),FIND(" ",SUBSTITUTE(TRIM(MID(A2,FIND(",",A2)+1,999))," ","*",1))),"*"," "),TRIM(MID(A2,FIND(",",A2)+1,999)))
    handles hyphenated first names as well


    still working on the a5 solution

    Edit-

    I knew SOMEONE would come up with something before me...*sigh*...lol
    Last edited by dredwolf; 12-06-2012 at 03:44 AM.

  15. #15
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do you split last names and two-part first names from one cell?

    anyways, for what its worth ...a5
    =Trim(SUBSTITUTE(TRIM(SUBSTITUTE(A2,A3&","," ")),A4," "))

    Edit, the first trim may be unnecessary, but I included it just in case..I truly dislike leading spaces messing up my formulas, especially with my string 'handicap' anyways
    Last edited by dredwolf; 12-06-2012 at 04:14 AM.

  16. #16
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do you split last names and two-part first names from one cell?

    Yey! Thanks Everyone... This has been a pain half my day!

    I knew someone can solve it!

  17. #17
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: How do you split last names and two-part first names from one cell?

    You are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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