Results 1 to 10 of 10

Using Macros to Automatically Insert New Rows to Separate Cells with Delimiter

Threaded View

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    LA, USA
    MS-Off Ver
    Office 2010
    Posts
    4

    Post Using Macros to Automatically Insert New Rows to Separate Cells with Delimiter

    Hello everybody. This is my first time posting on this forum so please be patient with me.

    So I managed use infopath to collect data and exported to an excel file. The problem is that in infopath, all fields that are from a repeating table are combined into one cell separated by a semicolon. Therefore I need to find a macro that will be able to do the following:
    1. check each cell in a row to find the cell with the most number of semicolons (this will tell the macro to insert this many rows)
    2. push back the unexpanded data behind to make room to expand the cells from the first row and convert a list of semicolons into individual rows
    3. go to the next unexpanded column and do the same until the end of the database
    4. if possible, fill in the gaps in the A column with the corresponding number

    I have multiple repeating tables so I was wondering if there is a macro that can check if there are extra semicolon on each cell in each column and add rows accordingly.

    I been looking online for a solution that can do this, but I couldn't find it. I'm hoping that there is a universal macro that can accomplish all of the above so not only I can use it for this particular database, but other people who are exporting infopath with repeating tables to excel can also use this macro.

    Below is an example with the excel file. Obviously that is not the database I have. (The database I have is far longer and has at least 6 repeating tables)

    Any advice or pointers would be wonderful
    Thank you so much


    After.PNGBefore.PNG
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to separate cell values and insert into new rows
    By dj7616 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2013, 09:10 PM
  2. [SOLVED] Adding rows automatically in two separate worksheets
    By drakaz in forum Excel General
    Replies: 2
    Last Post: 04-29-2013, 08:45 AM
  3. Insert rows to separate categories
    By ollylondon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2012, 10:54 AM
  4. [SOLVED] How to Separate Text and Add New Rows Automatically
    By ucdags06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2012, 06:28 PM
  5. [SOLVED]Separate cell string at the first delimiter (ex. space) - macro
    By sky123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2011, 05:46 PM

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