Copy and insert rows and number of times
Solved/Closed
Related:
- Excel duplicate row x times
- How to duplicate cells in excel multiple times - Best answers
- Excel duplicate every row x times - Best answers
- Saints row 2 cheats - Guide
- Delete duplicates in excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel duplicate sheet - Excel Forum
- How to duplicate data from one excel sheet to another ✓ - Excel Forum
8 responses
aquarelle
Posts
7181
Registration date
Saturday 7 April 2007
Status
Moderator
Last seen
14 February 2026
491
12 Oct 2010 à 17:46
12 Oct 2010 à 17:46
Hi,
Look at this thread or try this macro:
Best regards
Look at this thread or try this macro:
Sub InsertRows()
Dim I As Long, J As Integer, Nb As Integer
For I = Range("A65536").End(xlUp).Row To 2 Step -1
Nb = 4
For J = 1 To Nb - 1
Rows(I + J).Insert xlDown
Rows(I).Copy
Rows(I + J).PasteSpecial '
Next
Next
Range("A1").Select
Application.CutCopyMode = False
End Sub
Best regards
13 Oct 2010 à 13:09
Help please?
Thank you.
10 Jun 2014 à 08:54
Sub Copy_Row()
'Written by Barrie Davidson
Dim NRow As Integer
Dim CurrentRow As Integer
Dim SheetName As String
Dim Datasheet As String
Datasheet = ActiveSheet.Name
ActiveWorkbook.Sheets.Add after:=Sheets(Datasheet)
SheetName = ActiveSheet.Name
Sheets(Datasheet).Select
Range("A1").Select
Do Until Selection.Value = ""
CurrentRow = Selection.Row
NRow = InputBox("Current row selected is " & CurrentRow & Chr(13) & _
"Enter Number of Copies Required")
Selection.EntireRow.Copy
Sheets(SheetName).Select
ActiveCell.Range("A1:A" & NRow).EntireRow.Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.Range("A" & NRow).Offset(1, 0).Select
Sheets(Datasheet).Select
ActiveCell.Offset(1, 0).Select
Loop
End Sub