Jul 02 2019 10:10 AM
Hello,
I have an excel spreadsheet with about 50 columns and I want to insert new columns of empty space around every 5 columns (5th, 10th, 15th...). How would I go about doing that?
Jul 02 2019 10:29 PM
Hi,
you can do it with the follwing macro:
Sub InsertColumns()
Dim lngCol As Long
Dim lngColMax As Long
With ActiveSheet
lngColMax = 51
For lngCol = lngColMax To 1 Step -5
.Columns(lngCol).Insert
Next lngCol
End With
End Sub
Best regards Bernd
the vba-tanker - a database full of macros