Copy and paste 20 rows down

bgonen

Active Member
Joined
Oct 24, 2009
Messages
264
I'm trying to find few commands to the following:
Copy cell A1 to a range C1:C20
Then go to the next value in A2 and copy the value to range C21:C40

(I got roughly 330 values ,,between A1 and A330,,so I don't want to do it manually.

Hope someone can help
Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Why not use formulas? Just put "=A1" in C1:C20, "=A2" in C21:C40, etc., up to "=A330" in C6521:C6600, and then they'll update as soon as you change anything in A1:A330. If you ever need to copy the actual numbers, copy the C column, but use Paste Special, and pick Values, not Formulas.
 
Upvote 0
Try

Code:
Sub AnotherTest()
Dim LR As Long, i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
    Range("A" & i).Copy Destination:=Range("C" & Rows.Count).End(xlUp).Offset(1).Resize(20)
Next i
End Sub
 
Upvote 0
Sub test()
Dim lastrow As Integer
Range("a1").Select
i = 1
Do Until IsEmpty(ActiveCell)
Range("A" & i).Select
lastrow = Range("c" & Rows.Count).End(xlUp).Row
ActiveCell.Copy
Range("C" & lastrow & ":C" & (lastrow + 20)).PasteSpecial
i = i + 1
Loop
lastrow = Range("c" & Rows.Count).End(xlUp).Row
Range("C" & lastrow).Select
End Sub
 
Last edited:
Upvote 0
Thanks a lot all,
I had used VoP commands and it works just fine

Peter,
Your commands had saved me so much valuable time

Thanks again
bg
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top