Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
VBA Insert Multiple Columns
SUBMITTED BY:
gamefreak
DATE:
June 25, 2019, 5:34 p.m.
FORMAT:
Text only
SIZE:
325 Bytes
Raw
Download
Tweet
HITS:
6711
Go to comments
Report
Sub InsertMultipleColumns()
Dim i As Integer
Dim j As Integer
ActiveCell.EntireColumn.Select
On Error GoTo Last
i = InputBox("Enter number of columns to insert", "Insert Columns")
For j = 1 To i
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromRightorAbove
Next j
Last:Exit Sub
End Sub
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus