+ Reply to Thread
Results 1 to 4 of 4

Spliting a name cell

Hybrid View

  1. #1
    Registered User
    Join Date
    06-19-2007
    Posts
    3

    Spliting a name cell

    Morning,

    I have got a range of data which is an import from a different system. It basically has various colums imported into excel, i need to split first name and surname. It is imported in the same colum and is seperated by a comma.

    EG...

    Smith, John
    Carter, Bill

    I'm struggling finding the formula which search's for the comma and splits the cell.


    Can anyone help??

    Many Thanks

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    If your name is in cell A1,

    =RIGHT(A1,LEN(A1)-FIND(",",A1)-1)

    gives the first name and

    =LEFT(A1,FIND(",",A1)-1)

    gives the surname
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Quote Originally Posted by rachew
    Morning,

    I have got a range of data which is an import from a different system. It basically has various colums imported into excel, i need to split first name and surname. It is imported in the same colum and is seperated by a comma.

    EG...

    Smith, John
    Carter, Bill

    I'm struggling finding the formula which search's for the comma and splits the cell.


    Can anyone help??

    Many Thanks
    An alternative to a formula would be to use Data>TextToColumns and choose a Delimiter of a comma. This will split the cells up for you.

    Richard

  4. #4
    Registered User
    Join Date
    06-19-2007
    Posts
    3
    Cheers for your help.

    It works spot on.

    I was doing a version of the second tip by copying the cell into a different spreadsheet and saving it as a .txt, then importing it as a Delimiter of a comma, then copying the 2 cells back into the original spreadsheet but it was a long winded way round!!

    Thanks Again

+ 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