+ Reply to Thread
Results 1 to 6 of 6

Split data with vba code after every comma.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Split data with vba code after every comma.

    Is it possible to write a code, that after every comma the text is splitted to different collumns, in the same row of the first sentence of the alinea.

    Split data doesn't do the trick

    See attachment

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,716

    Re: Split data with vba code after every comma.

    I am not quite sure I understand what you need. Can you provide an example of what your sample data should look like after "splitting?"
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Split data with vba code after every comma.

    Hi,

    I'm not clear what you mean by 'in the same row of the first sentence of the alinea'. Nor indeed 'Split data'

    Have you tried Data..Text to Columns, using just the comma as a delimiter?


    Otherwise upload the workbook again and manually add examples of the results that you expect to see
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Re: Split data with vba code after every comma.

    In the first sheet, two examples. In the second sheet the result i need. Instead of one column, it needs to be multiple columns (after every single comma). And every example in one row.

    See attachment.

  5. #5
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Re: Split data with vba code after every comma.

    Is it possible to write a code, that after every comma the text is splitted to different collumns, in the same row.

    Split data doesn't do the trick

    In the first sheet, two examples. In the second sheet the result i need. Instead of one column, it needs to be multiple columns (after every single comma). And every example in one row.

    See attachment

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Split data with vba code after every comma.

    See if the attached helps. It doesn't need any code.

    1. Copy the formulae in D1:I1 down your whole list.
    2. Copy column D and use Paste Special Values to paste it somewhere else, typically another sheet.
    3. Use TextToColumns on the copied list and specify the "|" character using the Delimited option. Be sure to deselect the comma delimiter.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] split numbers with comma
    By max_max in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-10-2013, 05:26 PM
  2. how to convert excel split code to word split code
    By gsrikanth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2012, 07:56 AM
  3. Split Column at comma
    By KarambaStar in forum Excel General
    Replies: 5
    Last Post: 04-11-2008, 12:45 PM
  4. [SOLVED] How to seperate data in a cell which is split by a comma
    By Eamonn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2006, 04:35 AM
  5. How to split a value seperated by comma?
    By Ticktockman in forum Excel General
    Replies: 2
    Last Post: 03-23-2006, 12:25 PM

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