Hi Everyone,
I have a macro as below
Sub Macro2()
'
For i = Range("A" & Rows.Count).End(3)(1).Row To 2 Step -1
If Range("D" & i) = "Task 1" Then
Range("D" & i + 1).EntireRow.Insert
Rows(i + 1).Value = Rows(i).Value
Cells(i + 1, 4).Value = "Task 1"
x = i + 2
Cells(i + 1, 5).Value = "=R[-1]C+1"
Cells(i + 1, 6).Value = "=R[-1]C+1"
End If
Next i
'
End Sub
Its basically looking for "Task 1" and then inserts a line underneath, copies the line from above and adds a day to start and finish.
I want to be able to repeat this 21 times, so that I end up with 21 "Task 1"s with a start date over 21 days
I have tried a couple of loops but I cant get this to work.
Does anyone have any ideas?
Thanks
Alex
Bookmarks