+ Reply to Thread
Results 1 to 6 of 6

Macro to split words

  1. #1
    Registered User
    Join Date
    12-01-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    5

    Wink Macro to split words

    Hi Guys,

    I have a excel sheet that contains about 8000 entries... I need to create a macro to help me.

    my file is like this:

    123
    RT4
    eliott.billy
    mark.garth
    elena.david

    I would like to split first name and last name. All the ligne that contains "." split it in 2.

    Example
    eliott.billy will become eliott (column A) billy (column B)

    Does anyone have any idea?
    Last edited by Lana75; 12-01-2009 at 06:31 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Macro to split words

    Select the column
    Click Data - Text to columns
    Select delimited, then "next"
    Select the . symbol as the delimiter
    click Finished

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

    Re: Macro to split words

    Hi Lana75,

    Welcome to the forum.

    You don't need a macro to do this. See if the following five steps do the trick:

    1. Highlight the data in question
    2. From the Data menu select Text to Columns
    3. Ensure the Delimited radio button is selected and then click Next
    4. Click the Other check box and enter "." into its text box
    5. Ensure there are no other delimiters selected and then click Finish

    HTH

    Robert
    ____________________________________________
    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

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

    Re: Macro to split words

    Re: Text to Columns -> once complete it's worth repeating the process simply to turn off the period delimiter by un-checking it... if you don't you run the risk of some odd results copying/pasting numbers in your current XL session
    (ie XL will try to be helpful and "remember" your "preferred" delimiter whenever you paste values)

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro to split words

    or maybe
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  6. #6
    Registered User
    Join Date
    12-01-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to split words

    Thanx guys

+ 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