Results 1 to 7 of 7

Loop rows and columns

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2011
    Location
    Spain
    MS-Off Ver
    Excel 2003
    Posts
    5

    Loop rows and columns

    Hi,

    I needed to do something in excel that only can be done with macros, but I had no idea, so I started to study macros last week and tried to do it, but it's definitely too much for me so need your help please:

    I have a report in which some cells have 2-3-4 values separated by "/", and I need that a new row is inserted for each of them and the rest of the cells in the row that had only 1 value are now copied in the new inserted rows, so that where I had 1 row with 3 values in same cell now I have 3 rows with each value in one row and the rest of cells the same.

    So I managed to create a macro that checks the first row until it finishes and insert the new row when it encounters the "/", but I don't know how to continue with:

    - Make it insert the number of rows depending on the number of values separated by "/" in the cell (I only did it for 1).
    - Make it start with first row, and once it's finished, continue with the second row, third, etc... til the end, inserting new rows every time it finds the mentioned situation.
    - Sometimes there will be 2 cells in the same row with this "problem", but always with the same number of values within it. In these cases I need that the same split is done for the second cell with "/", like with the first one.

    Please find attached the file with an example including the macro I tried.

    Thanks a lot in advance
    Attached Files Attached Files
    Last edited by twomind; 08-09-2011 at 11:17 AM.

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