+ Reply to Thread
Results 1 to 9 of 9

split a firstname and surname in a cell into 2 separate cells

  1. #1
    Registered User
    Join Date
    09-07-2013
    Location
    adelaide
    MS-Off Ver
    Excel 2010
    Posts
    24

    split a firstname and surname in a cell into 2 separate cells

    Hi, I have to split a cell with a first name and a surname into separate cells ,eg
    the name in cell A1 I would like to split into 2 cells say A2 and A3, is there a macro I can do that with ?
    Thankyou in advance

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: split a firstname and surname in a cell into 2 separate cells

    Hi,
    what is the format of the name,
    how are the two parts differentiated,
    are ALL examples of the joined names IDENTICAL in structure,
    how many rows would you expect
    where does the data come from

    depending on the answers above, you can easily do it with a macro or simply using a formula and copying the formula down you spreadsheet

    Jmac

  3. #3
    Registered User
    Join Date
    09-07-2013
    Location
    adelaide
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: split a firstname and surname in a cell into 2 separate cells

    Hi Thanks for quick reply!
    Name format example Biseell Metehne
    differentiated by a space
    Identical Yes
    rows 100
    not exactly sure what you mean.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: split a firstname and surname in a cell into 2 separate cells

    THis woud be a simple process using Text2Columns, using "space" as the delimiter
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: split a firstname and surname in a cell into 2 separate cells

    I can see why Ford is a serious moderator.

    My last question was trying to see if this is a "one off" problem you have or is likely to be a regular task, that often influences suggestions on a solution.

    Given your answers, the suggestion from Ford in post #4 sounds like a good solution

    Text 2 columns

    To do this, use Text to Columns. Select the column where you have the names, go to Data, Text to Columns, select Delimited in Step 1, in Step 2 make sure that the space checkbox is is the only one activated. Finally, in step 3 select the Destination cell (It defaults to the current cell so select the columns you need). Hit Finish and that's it.

    Cheers

    Jmac1947

    1. Please consider clicking on the * Add Reputation if you think this post has helped you
    2. Mark your thread as SOLVED when question is resolved

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: split a firstname and surname in a cell into 2 separate cells

    jmac, you make a very good point, that if this is a recurring process, even though T2C is quick, it can become laborious over time. As a once-off (or just now and then), it will work just fine, otherwise a formula route might be better. Something like...
    =LEFT(A1,FIND(" ",A1,1)-1)
    and
    =RIGHT(A1,LEN(A1)-FIND(" ",A1,1))

  7. #7
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: split a firstname and surname in a cell into 2 separate cells

    Ford, agreed but I am thinking that for 100 rows either way is probably going to be OK, if the data is externally generated then T2C is probably slightly infront, if the OP is cutting data into a static spreadsheet then (provided there is a "safe place" to store the formula then copy, drag,paste is very quick

    Jmac
    Last edited by jmac1947; 01-27-2014 at 02:17 AM. Reason: signature block not really appropriate for post

  8. #8
    Registered User
    Join Date
    09-07-2013
    Location
    adelaide
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: split a firstname and surname in a cell into 2 separate cells

    oh gosh should have checked text to columns first thankyou for that.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: split a firstname and surname in a cell into 2 separate cells

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to take split a two digit cell into two separate cells.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-25-2013, 08:55 PM
  2. Replies: 4
    Last Post: 08-23-2012, 08:01 AM
  3. Replies: 5
    Last Post: 06-06-2007, 09:10 AM
  4. Splitting firstName from Surname
    By Althea in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2006, 04:10 PM
  5. Split data from one cell to two separate cells
    By Michele in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-25-2005, 05:05 PM

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