Reputation: 1040
I want to be able to make a selection in Excel, then run a macro that will duplicate the above row in to all the rows below.
This:
Would become:
I can do this for just one row using CTR + D, but I want to be able to do it for 100s of rows at a time with a macro.
My starting point was this:
Sub DuplicateRow()
Selection.FillDown
End Sub
Upvotes: 0
Views: 371
Reputation: 8606
If you really want to do it with VBA macro:
Sub CopyDown()
Selection.Rows(1).Offset(-1, 0).Copy
Selection.PasteSpecial
Application.CutCopyMode = False
End Sub
Upvotes: 2