Answers for "add specific amount of rows after row"

0

add specific amount of rows after row

Sub insertRows()
    Dim i As Long
    Dim j As Variant
    j = InputBox("How many rows would you like to insert?", "Insert Rows")
    If j = "" Then
        j = 1
    End If
    For i = 1 To j
        ActiveCell.Rows.EntireRow.Select
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    Next
End Sub
Posted by: Guest on December-13-2020

Code answers related to "add specific amount of rows after row"

Browse Popular Code Answers by Language