Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
VBA Multiple Rows
SUBMITTED BY:
gamefreak
DATE:
June 25, 2019, 5:37 p.m.
FORMAT:
Text only
SIZE:
439 Bytes
Raw
Download
Tweet
HITS:
6565
Go to comments
Report
#Once you run this macro it will show an input box and you need to enter the number of rows you want to insert.
Sub InsertMultipleRows()
Dim i As Integer
Dim j As Integer
ActiveCell.EntireRow.Select
On Error GoTo Last
i = InputBox("Enter number of columns to insert", "Insert
Columns")
For j = 1 To i
Selection.Insert Shift:=xlToDown,
CopyOrigin:=xlFormatFromRightorAbove
Next j
Last:Exit Sub
End Sub
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus