Trying to figure out how can I pull out columns under the rows that are infront of them

Image 1

In the image what I want is under 6 I can add another row and put the data for D6 an E6 the same way.. Similarly under the 12the row, I can add 2 more and add data for D12 and E12 and under that F12 and G12.. What I want

Notice the numbers in the A column are repeating.. instead of numbers I have names.. also there are more than 1000 rows and around 50 columns..

1 Answers

0
Community On

Work in a For/Next loop through the rows from the bottom up. For each row, find the right-most column. In a nested Do While/Loop based on the earlier 'last column' being greater than 3, insert a new row underneath the current row and fill it with the value from column A and the last two dates from the current row. Clear the last two dates from the current row and check whether the 'last column' is still greater than 3. Repeat the row insertion and value transfer if necessary. Finally, shift to the row above and continue processing.