Copy and paste one cell into 48 and then repeat

Closed
katie456 - Oct 29, 2018 at 01:05 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 29, 2018 at 11:52 AM
Hello, I've tried to piece together how to do this function and I feel like it's simple but I need help please!

Here's the recording for 2 times. I need one cell pasted into 48 rows and then continuing for 387 times.

Range("J2").Select
Selection.Copy
Range("G2:G49").Select
ActiveSheet.Paste
Range("J3").Select
Selection.Copy
Range("G50:G98").Select
ActiveSheet.Paste

Thank you!

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Oct 29, 2018 at 11:52 AM
Hi Katie,

Give the following code a try:
Sub RunMe()
Dim x As Integer

x = 2

For Each cell In Range("J2:J389")
    cell.Copy Range(Cells(x, "G"), Cells(x + 47, "G"))
    x = x + 48
Next cell
End Sub


Best regards,
Trowa
0