Macro: copy and paste [Closed]

Report
-
 Dee -
Hello,
Can anyone help me, please?
I want an excel macro that will copy and paste some data. I have a column of data from A1 to A31. I would like a macro that can copy data from cell A1 and paste in the cell range A40 to A60, then copy A2 and put it in cell range A61 to A80 than copy A3 and paste into A81 to A100, etc.

Regards,
Dee.

1 reply

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
797
A40 to A60 are 21 rows where as A61 to A80 are 20 rows and also A81 to A100 are 20 rows. To void inconsistency I have made the first set A41 to A60

in that case use this macro

Sub test()
Dim j As Integer, k As Integer
For j = 1 To 31
k = (j + 1) * 20
'MsgBox k
Cells(j, "A").Copy
Range(Cells(k + 1, "A"), Cells(k + 20, "A")).PasteSpecial
Next j
End Sub
Great Thanks, It worked perfectly.

Regards,
Dee

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!