'How to insert copied rows multiple times?
I would like to insert a copied row into another row (x, y or z below). The closest macro I've seen was this
Sub CopyConcatenate()
Dim ws As Worksheet
Dim rng As Range
'~~> Set this to the relevant worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
With ws
'~~> Set your range
Set rng = .Rows(ActiveCell.Row)
'~~> Copy the range
rng.Copy
'~~> Insert the range
rng.Offset(5).Insert Shift:=xlDown
'~~> Clear the clipboard. More importantly remove the
'~~> ant like borders
Application.CutCopyMode = False
End With
End Sub
The problem is that I don't want the new copied row to be 5 below the initial row. I just want to copy the initial row wherever I'd like.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
