+ Reply to Thread
Results 1 to 6 of 6

Thread: Text to columns

  1. #1
    Registered User
    Join Date
    02-02-2012
    Location
    grenada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Text to columns

    i am trying to do text to column (see example below)
    John De Santos.
    How do I separate the names, but keep De Santos (as is) in one column.

  2. #2
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,285

    Re: Text to columns

    Hi aelspeth and welcome to the forum,

    This is an age old problem. If you are delimiting a string by spaces and "De Santos" has a space in the last name, it will end up in two different columns. The same thing happens with trying to Proper() names like McIntire. It will come out as Mcintire. If it were me, I'd take the space out of the last name and make it DeSantos using Search and Replace.

    I'm sorry but there is no good/generalized answer.
    One test is worth a thousand opinions.
    Click the * below to say thanks.

  3. #3
    Valued Forum Contributor OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,647

    Re: Text to columns

    If you only ever have 'first name' 'last name' then you can do it with formulas by splitting on the first space. If there is no consistent format, then you may have to use TTC and then repair those that have multiple words for the last name.
    Good luck.

  4. #4
    Registered User
    Join Date
    01-26-2012
    Location
    Slovenia; Kranj
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Text to columns

    Hi,

    if you have ...

    A1 ... John De Santos
    B1 ... =LEFT(A1;SEARCH(" ";A1)-1) ... John
    C1 ... =RIGHT(A1;LEN(A1)-SEARCH(" ";A1)) ... De Santos

    ... probably you'll need to replace ";" with ",".


    Cheers, Marko

  5. #5
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,285

    Re: Text to columns

    What if some of the names have middle names or middle initials?

    John J Doe
    Bill Mac Intoch
    Billy Joel Smith
    Prince
    One test is worth a thousand opinions.
    Click the * below to say thanks.

  6. #6
    Registered User
    Join Date
    01-26-2012
    Location
    Slovenia; Kranj
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Text to columns

    Quote Originally Posted by MarvinP View Post
    What if some of the names have middle names or middle initials?
    Then answare is ...

    Quote Originally Posted by MarvinP View Post
    I'm sorry but there is no good/generalized answer.
    ... or check and correct results.

    Cheers, Marko

+ 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.2.0