Copy & Paste a range of data 100 times

VinodKrishnappa

New Member
Joined
Aug 6, 2016
Messages
31
Please can any one help me on this...
I want to copy paste a range of data (A1: F20) one after one 100 times in the same sheet after giving a row gap for each paste value, i need some help in the below macros

Sub Macro3()
'
' Macro3 Macro
' Copy&OPaste
'
' Keyboard Shortcut: Ctrl+z
'
Selection.Copy
Range("A8").Select
ActiveSheet.Paste
Range("A15").Select
ActiveSheet.Paste
Range("A22").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=100
End Sub
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try this:-
This assumes row 21 is blank
Code:
[COLOR="Navy"]Sub[/COLOR] MG30Aug23
[COLOR="Navy"]Dim[/COLOR] ray [COLOR="Navy"]As[/COLOR] Variant, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
ray = Range("A1:F21")
[COLOR="Navy"]For[/COLOR] n = 22 To 2100 [COLOR="Navy"]Step[/COLOR] 21
    Cells(n, 1).Resize(21, 6).Value = ray
[COLOR="Navy"]Next[/COLOR] n
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Your description (A1:F20) and your code sample (A8, A15, A22) don't seem to agree.

If Mick's suggestion (or the following non-looping similar code) does not do what you want, then you may need to clarify further.

Code:
Sub CopyMultiple()
  With Range("A1:F21")
    .Copy Destination:=.Resize(.Rows.Count * 100)
  End With
End Sub
 
Upvote 0
Try this:
Copying in range below Range("A1:F20")

Code:
Sub Copy_Me()
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row + 2
    For i = 1 To 100
        Range("A1: F20").Copy Destination:=Range("A" & Lastrow)
        Lastrow = Cells(Rows.Count, "A").End(xlUp).Row + 2
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
That is a interesting way to do it. I need to remember this.
Your description (A1:F20) and your code sample (A8, A15, A22) don't seem to agree.

If Mick's suggestion (or the following non-looping similar code) does not do what you want, then you may need to clarify further.

Code:
Sub CopyMultiple()
  With Range("A1:F21")
    .Copy Destination:=.Resize(.Rows.Count * 100)
  End With
End Sub
 
Upvote 0
1234R1 is the number of rows in original block473
5678N1 is number of columns in the block
9101112P1 is how many duplicate blocks required
3
1234
5678
9101112
7
1234
5678
9101112
this macro will automatically detect how many initial rows and columns11
1234and how many duplicate blocks required
5678
9101112rrow = Cells(1, 18) + 2
For j = 1 To Cells(1, 16)15
1234 For k = 1 To Cells(1, 18)
5678 For L = 1 To Cells(1, 14)
9101112 Cells(rrow, L) = Cells(k, L)
Next L19
1234 rrow = rrow + 1
5678 Next k
9101112 rrow = rrow + 1
Next j
1234 End Sub
5678
9101112
1234
5678
9101112

<colgroup><col span="19"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,221,479
Messages
6,160,073
Members
451,616
Latest member
swgrinder

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