B
bob
the following copies 2 source books to destination sheets and repeats
macro coping to next line in destination.
how would i copy the source headings A1 to F2 at A1 the first time and
insert a row at end of data copy loop. then on the next macro loop copy
headings after inserted row.
sub copy()
With newWks
LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
End With
For i = 1 To LastRow
With TestOldWks
Set destCell = .Range("a" & _
.Cells(.Rows.count, "C").End(xlUp).Row
+1)
oldWks.Rows(i).Copy _
Destination:=destCell
End With
With TestNewWks
Set destCell = .Range("a" & _
.Cells(.Rows.count, "C").End(xlUp).Row
+1)
newWks.Rows(i).Copy _
Destination:=destCell
End With
Next i
End Sub
thanks
macro coping to next line in destination.
how would i copy the source headings A1 to F2 at A1 the first time and
insert a row at end of data copy loop. then on the next macro loop copy
headings after inserted row.
sub copy()
With newWks
LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
End With
For i = 1 To LastRow
With TestOldWks
Set destCell = .Range("a" & _
.Cells(.Rows.count, "C").End(xlUp).Row
+1)
oldWks.Rows(i).Copy _
Destination:=destCell
End With
With TestNewWks
Set destCell = .Range("a" & _
.Cells(.Rows.count, "C").End(xlUp).Row
+1)
newWks.Rows(i).Copy _
Destination:=destCell
End With
Next i
End Sub
thanks