I am trying to loop a code so I do not have to manually type in the cell range every time.
Sub copy()
Dim x As Range
Dim y As Range
Set x = Range("C24361:F24363")
Set y = Range("P1")
x.copy
y.Select
ActiveSheet.Paste
x.Offset(5, 0).copy
y.Offset(3, 0).Select
ActiveSheet.Paste
x.Offset(10, 0).copy
y.Offset(6, 0).Select
ActiveSheet.Paste
x.Offset(15, 0).copy
y.Offset(9, 0).Select
ActiveSheet.Paste
x.Offset(54, 0).copy
y.Offset(12, 0).Select
ActiveSheet.Paste
x.Offset(59, 0).copy
y.Offset(15, 0).Select
ActiveSheet.Paste
x.Offset(64, 0).copy
y.Offset(18, 0).Select
ActiveSheet.Paste
x.Offset(69, 0).copy
y.Offset(21, 0).Select
ActiveSheet.Paste
x.Offset(108, 0).copy
y.Offset(24, 0).Select
ActiveSheet.Paste
x.Offset(113, 0).copy
y.Offset(27, 0).Select
ActiveSheet.Paste
x.Offset(118, 0).copy
y.Offset(30, 0).Select
ActiveSheet.Paste
x.Offset(123, 0).copy
y.Offset(33, 0).Select
ActiveSheet.Paste
x.Offset(162, 0).copy
y.Offset(36, 0).Select
ActiveSheet.Paste
x.Offset(167, 0).copy
y.Offset(39, 0).Select
ActiveSheet.Paste
x.Offset(172, 0).copy
y.Offset(42, 0).Select
ActiveSheet.Paste
x.Offset(177, 0).copy
y.Offset(45, 0).Select
ActiveSheet.Paste
End Sub
Right now I grab the range specified...and drop three copy..paste..etc..once 4 copies are made...I need to drop 54 and run the same drop 5 copy (so 59)..and continue the 3 drop for the paste...Any clues on how I can accomplish this task?
THANK YOU
5,10,15,54
and then it is5,10,15,59
or10,15,20,59
? – Siddharth Rout5,10,15,54
? Can you write a second set of copy paste code in yuor question above so that I can see what do you mean? – Siddharth Rout