+ Reply to Thread
Results 1 to 4 of 4

Separate values from a cell to individual cells

  1. #1
    Registered User
    Join Date
    12-16-2010
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    14

    Separate values from a cell to individual cells

    Hi

    I have a set of values in a cell separated by a hyphen. I want to put each value in an individual cell,

    Lets say in cell A1 i have 1-5-12-15-25-35

    and i want the following:

    B3 C3 D3 E3 F3 G3
    1 5 12 15 25 35

    can i do this using VBA???

    Thanks,

    Adilson
    Last edited by adilson.perez; 05-07-2012 at 03:14 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Separate values from a cell to individual cells

    Use Text To Columns with Delimiter -

  3. #3
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Separate values from a cell to individual cells

    The syntax would be:

    Please Login or Register  to view this content.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  4. #4
    Registered User
    Join Date
    12-16-2010
    Location
    Puerto Rico
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Separate values from a cell to individual cells

    It working perfect,

    Thanks to both!!!

+ 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