+ Reply to Thread
Results 1 to 5 of 5

VBA macro to split table to rows by semicolon in two columns

  1. #1
    Registered User
    Join Date
    05-27-2019
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    2

    VBA macro to split table to rows by semicolon in two columns

    Hello everyone,
    i have some trouble with inventing a way to solve my problem. I'm relatively new in vba so I want to ask you to help me

    I have table and I want to multiply rows and split data from two columns (info separated by semicolon) to rows. Like in the picture below.

    table_sample.jpg


    Thanks in advance for your help!!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: VBA macro to split table to rows by semicolon in two columns

    Try this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-27-2019
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA macro to split table to rows by semicolon in two columns

    Thanks mrice for your quick answer, for my example it's works great, but if i would have table containing 50 columns and my two columns i would like to split will be somewhere in the middle of that i have to copy this "Cells(Rows.Count, 8).End(xlUp).Offset(1, 0) = Cells(N, 1)" line for 50 times?

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: VBA macro to split table to rows by semicolon in two columns

    You try an additional loop.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor murray83's Avatar
    Join Date
    05-05-2016
    Location
    Daventry
    MS-Off Ver
    365
    Posts
    146

    Re: VBA macro to split table to rows by semicolon in two columns

    this is great and does just what i want but with one alteration ( if possible ) could you do the same split it down and keep same data if the text in the cell had no ; or is that just a pipe dream

+ 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. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  2. [SOLVED] Split one string in cell after second semicolon
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2014, 01:03 PM
  3. split multiple semicolon separated values into new rows for multiple columns
    By bruno08102013 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-05-2014, 05:27 PM
  4. Replies: 4
    Last Post: 05-11-2013, 10:47 PM
  5. Please Help - split a string having both comma (,) and semicolon(;)
    By Chandan.jha in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2012, 01:53 AM
  6. Split text string with semicolon
    By Pragathibalepuni in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-09-2012, 12:17 PM
  7. Help? Split table rows to columns.
    By anos in forum Access Tables & Databases
    Replies: 3
    Last Post: 07-04-2011, 03:24 AM

Tags for this Thread

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