Excel Macro help, copy rows and paste rows X times below
Closed
kaidai
TrowaD
- Posts
- 1
- Registration date
- Thursday May 4, 2017
- Status
- Member
- Last seen
- May 4, 2017
TrowaD
- Posts
- 2884
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 21, 2022
Related:
- Excel Macro help, copy rows and paste rows X times below
- Excel macro to insert rows between data - Forum - Excel
- Insert Multi Rows Between Existing Data ✓ - Forum - Excel
- How to insert blank rows using macros in Excel - Guide
- Excel - Macro to highlight Rows with Duplicate values in a cell ✓ - Forum - Excel
- Excel Macro to insert row based on data ✓ - Forum - Excel
1 reply
TrowaD
May 8, 2017 at 11:43 AM
- Posts
- 2884
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 21, 2022
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