EXCEL Column Adjustment

W

wchau81

Hi,

I'm not sure if this is possible, but any help would be great.

I want to add two new columns in between every current column I have
now. For example

Current:
ABCDEFG

Desired:
A (Space) (Space) B (Space) (Space) C....etc. There are lots and lots
of column so the manual add will not be efficient.

Thanks for any assistance.

William
 
D

Dave Peterson

Actually, it might not be too bad.

Select columns B:C, then rightclick on the selection and choose Insert

Now select E:F and hit F4 (repeat last action)

But you could use a macro, too:

Option Explicit
Sub testme()
Dim iCol As Long
With Worksheets("sheet1")
For iCol = .Cells(1, .Columns.Count).End(xlToLeft).Column To 2 Step -1
.Columns(iCol).Resize(, 2).Insert
Next iCol
End With
End Sub

I used row 1 to find the last used column.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top