+ Reply to Thread
Results 1 to 9 of 9

Split comma separated entries to new rows

  1. #1
    Forum Contributor
    Join Date
    03-18-2010
    Location
    FL
    MS-Off Ver
    Excel 2016
    Posts
    147

    Split comma separated entries to new rows

    I have no acknowledge on VBA and programming and I currently have this data in a sheet

    Col A Col B
    105 399, 400
    207 405,406,407

    What I want to do is split the comma separated entries in the second column and insert in new rows like below:

    Col A Col B
    105 399
    400
    207 405
    406
    407
    Last edited by dandi10; 09-11-2013 at 04:27 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Split comma separated entries to new rows (No VBA)

    Try This Code

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    03-18-2010
    Location
    FL
    MS-Off Ver
    Excel 2016
    Posts
    147

    Re: Split comma separated entries to new rows (No VBA)

    Hi, thank you for your help. We are almost done. I'm not receiving the correct output (I just realized the post above is not showing correctly the columns), please see attached the sheet, I need the output as attached. Thanks again.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Split comma separated entries to new rows

    Ty This then:-

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Split comma separated entries to new rows

    Here is a version using top down design. As you can see it is mostly mehmetcik's code but without the GoTo command. GoTo is not so much in use today I think. Also without the Select command wich will make it run a bit faster.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  6. #6
    Forum Contributor
    Join Date
    03-18-2010
    Location
    FL
    MS-Off Ver
    Excel 2016
    Posts
    147

    Re: Split comma separated entries to new rows

    mehmetcik and Jacc, thank you, thank you!!!!! Very helpful. I appreciate your help )))))

  7. #7
    Registered User
    Join Date
    09-19-2009
    Location
    MN, US
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Split comma separated entries to new rows

    Hello,

    This code works splitting comma-separated entries to new rows, except I need it to move the entire row down, not just the cells in column 'B' down. Can anyone add to this code so that the rows move down as well?

    Thank you

  8. #8
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,414

    Re: Split comma separated entries to new rows

    A before/after example workbook would be quite useful for us to see exactly what you mean for your question. See the yellow boxed area at the top of this webpage for instructions on how to include a sample workbook in your message.

  9. #9
    Registered User
    Join Date
    09-19-2009
    Location
    MN, US
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Split comma separated entries to new rows

    Thank you for your reply. I did figure it out. I expanded the range of data from column "B" to "Z"
    Last edited by NewYorkVanilla; 05-02-2020 at 08:01 PM.

+ 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] VBA: To Split comma separated entries to new rows
    By Cytokine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2014, 08:58 PM
  2. Split content from comma separated variables in a cell and copy information
    By Snajder in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2012, 08:12 AM
  3. [SOLVED] Split the contents of the cell separated by comma into different cells
    By VivekBhise in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-30-2012, 06:50 AM
  4. Replies: 3
    Last Post: 01-13-2012, 08:20 AM
  5. Replies: 4
    Last Post: 09-04-2010, 03:37 AM

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