Copying data from one sheet to another

[Closed]
Report
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
Hello,

Macro newbie here. I'm trying to copy 351 rows of data from one sheet and paste the data to every 14th line on another sheet. Help!

DR

1 reply

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
try this macro "test"( "undo" is to clear sheet2 for retesting "test")

Sub test() 
Dim r As Range, c As Range 
Worksheets("sheet1").Activate 
Set r = Range(Range("A1"), Range("A1").End(xlDown)) 
For Each c In r 
c.EntireRow.Copy 
With Worksheets("sheet2") 
.Cells(Rows.Count, "A").End(xlUp).Offset(14, 0).PasteSpecial 
End With 
Next c 
With Worksheets("sheet2") 
.Range("A1:A14").EntireRow.Delete 
End With 

End Sub


Sub undo() 
 Worksheets("sheet2").Cells.Clear 

End Sub