Hello, i have a table of about 7 columns which I regularly run a macro to break down.
the problem i have is it takes so long, i wrote this but was wondering if anybody could suggest a quicker way of performing this kind of task?
Original table layout (actual table has anywhere between 100-200 rows):
Capture.JPG
Finished table layout:
Capture1.JPG
For ActiveRow = FindLastRow To 2 Step -1
StartDate = Range("G" & ActiveRow).Value
EndDate = Range("H" & ActiveRow).Value
RowsToInsert = EndDate - StartDate
For RowsToInsert = RowsToInsert To 0 Step -1
If RowsToInsert > 0 Then
Rows(ActiveRow).Copy
Rows(ActiveRow).Insert xlShiftDown
Range("G" & ActiveRow + 1).Value = StartDate + RowsToInsert
Else
End If
Next RowsToInsert
Next ActiveRow
Appreciate if anybody can help out with any advice on how i could shorten the time it takes to finish this task?
Bookmarks