Copy/paste a range 'n' times.
Solved/Closed
V_angel54
Posts
2
Registration date
Tuesday June 6, 2017
Status
Member
Last seen
June 8, 2017
-
Updated on Jun 8, 2017 at 03:17 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jun 9, 2017 at 03:17 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jun 9, 2017 at 03:17 AM
Related:
- Excel duplicate rows n times
- Excel free download - Download - Spreadsheets
- Excel marksheet - Guide
- Number to words in excel - Guide
- Excel date format dd.mm.yyyy - Guide
- Kernel for excel - Download - Backup and recovery
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Jun 8, 2017 at 03:14 AM
Jun 8, 2017 at 03:14 AM
Hello V_Angel54,
I assume that you simply high-light the data range that you wish to copy x number of times and that you paste it at the bottom of the existing data set in the same sheet. If so, the following code, placed in a standard module and assigned to a button may do the task for you:-
Following is the link to a small sample I made up for you to play with:-
https://www.dropbox.com/s/did79tutwlcqi1l/Copy%20selection%20n%20times.xlsm?dl=0
Enter the number of times that you wish to copy any selection into the yellow box (cell E1), select(high-light) the range that you wish to copy and click on the "RUN" button. The selection will be copied to the bottom of the existing data set the number of times that you have entered into the yellow box (cell E1).
I hope that this helps,
Cheerio,
vcoolio.
I assume that you simply high-light the data range that you wish to copy x number of times and that you paste it at the bottom of the existing data set in the same sheet. If so, the following code, placed in a standard module and assigned to a button may do the task for you:-
Sub CopySelection() Dim SCT As Long '----> SCT simply stands for "Selection Copy Times" Dim i As Long SCT = Sheet1.[E1].Value If SCT > 0 Then For i = 1 To SCT Selection.Copy Sheet1.Range("A" & Rows.Count).End(3)(2) Next i End If Sheet1.[E1] = "" Application.CutCopyMode = False End Sub
Following is the link to a small sample I made up for you to play with:-
https://www.dropbox.com/s/did79tutwlcqi1l/Copy%20selection%20n%20times.xlsm?dl=0
Enter the number of times that you wish to copy any selection into the yellow box (cell E1), select(high-light) the range that you wish to copy and click on the "RUN" button. The selection will be copied to the bottom of the existing data set the number of times that you have entered into the yellow box (cell E1).
I hope that this helps,
Cheerio,
vcoolio.
Jun 8, 2017 at 02:53 PM
Jun 9, 2017 at 03:17 AM
Cheerio,
vcoolio.