Excel Macro help, copy rows and paste rows X times below
Closed
kaidai
Posts
1
Registration date
Thursday May 4, 2017
Status
Member
Last seen
May 4, 2017
-
May 4, 2017 at 12:33 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - May 8, 2017 at 11:43 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - May 8, 2017 at 11:43 AM
Related:
- Excel Macro help, copy rows and paste rows X times below
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel date format dd.mm.yyyy - Guide
- How to paste data in alternate rows in excel - Excel Forum
- Excel vba copy rows to another worksheet based on criteria ✓ - Excel Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
549
May 8, 2017 at 11:43 AM
May 8, 2017 at 11:43 AM
Hi KaiDai,
Give the following code a try (assuming data is located over cell A1):
Best regards,
Trowa
Give the following code a try (assuming data is located over cell A1):
Sub RunMe() Dim x As Integer x = InputBox("What is x?", "Output x number of times") Range("A1").CurrentRegion.Copy Do Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial x = x - 1 Loop Until x = 1 Application.CutCopyMode = False End Sub
Best regards,
Trowa