+ Reply to Thread
Results 1 to 3 of 3

Splitting text from one cell into separate text fragments, Located in adjacent cells

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    Middle east
    MS-Off Ver
    Excel 2007
    Posts
    13

    Splitting text from one cell into separate text fragments, Located in adjacent cells

    Hello

    I am looking for some insights/solution to the following problem.

    I have files that contains data like "Hello world, this is day 295" in a certain column in the file (Let's say column A). I need to leave this data as-is, but created new columns containing all the individual data fragments from this data (see example file).

    The data I need to break is in col "X" (not specifically in col A) and the fragmented data can be placed in any consecutive columns of my choosing.
    The length of the data in each original data field in unknown, and so are the number of text fragments in it.

    I saw a couple of solutions, which gave a partial solution to my problem:
    One created rows from the fragments data.
    http://www.excelforum.com/excel-gene...a-formula.html

    The other did almost exactly what I wanted, but "stepped over" the original text.
    http://www.excelforum.com/excel-gene...ple-cells.html

    Personally, I liked the second solution, because it already contained the option to run across a large number of records in a column. I Just need to find out how make the macro start placing the fragmented data in a new columns, leaving the original data intact.

    Hoping you can help me
    :D
    Attached Files Attached Files
    Last edited by onsid; 02-16-2013 at 01:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Splitting text from one cell into separate text fragments, Located in adjacent cells

    Hello onsid,

    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Splitting text from one cell into separate text fragments, Located in adjacent cells

    onsid,

    I had just sent you a Private Message concerning your last post, which you can ignore.

    Thanks for the workbook.

    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.



    Please Login or Register  to view this content.

    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


    Then run the SplitData macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Registered User
    Join Date
    01-26-2013
    Location
    Middle east
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Splitting text from one cell into separate text fragments, Located in adjacent cells

    Stan, Harry,
    WOW !!!! Remarkable !!! Worked like a charm (both codes.. ).
    Thank you so much for your swift reply
    All the best!
    Last edited by onsid; 02-15-2013 at 10:04 AM.

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Splitting text from one cell into separate text fragments, Located in adjacent cells

    onsid,

    Thanks for the feedback.

    You are very welcome. Glad we could help.

    Come back anytime.

+ 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