Hello,
I have a macros listed below that would insert the # of rows based on the # you insert in the input box. This is copying everything on the selected cell including all data/text. Is there a way to copy formulas and data validations only?
Private Sub CommandButton1_Click()
Dim J, i As Long
J = Application.InputBox("Type the Number of Rows to be Inserted", , , , , , , 1)
If J = False Then Exit Sub
With Selection.Columns(1)
For i = .Rows.Count To 1 Step -1
.Cells(i).EntireRow.Copy
.Cells(i + 1).Resize(J).Insert
Next
End With
Application.CutCopyMode = False
End Sub
Bookmarks