I have one 'overview' tab with data used to create a timeline for each row for many people. The macro should copy data from that sheet into new sheets based on the names in column C - i.e. a dynamic set up. However, the macro I used copy rows but the formatting (a timeline bar) in each row didn't copy over correctly.
How can I copy over the data that's in the 'overview' tab into new sheets with one name per sheet? There is formatting above row 7, and this is also necessary to copy over. The actual data with the names start in row 7 of the 'overview' tab.
How can I copy over the data that's in the 'overview' tab into new sheets with one name per sheet? There is formatting above row 7, and this is also necessary to copy over. The actual data with the names start in row 7 of the 'overview' tab.
Code:
Sub RunIndividualProjects()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Timeline overview")
Set Target = ActiveWorkbook.Worksheets("Name 1")
J = 1
For Each c In Source.Range("E1:E1000") ' Do 1000 rows
If c = "Name 1" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
End Sub