Thread: Macro Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Macro Help

Here's one I've just recorded for you:

Sub Macro1()
Dim i As Integer
Range("C1").Select
ActiveCell.Columns("A:B").EntireColumn.Select
Selection.Insert Shift:=xlToRight
For i = 1 To 10
ActiveCell.Offset(0, 12).Columns("A:B").EntireColumn.Select
Selection.Insert Shift:=xlToRight
Next i
End Sub

This will insert two new columns C and D, then move 12 columns over
from the new columns and repeat 10 times. Just change the 10 and/or 12
to suit.

Hope this helps.

Pete

On Feb 21, 6:04*pm, stan wrote:
Hello,

I'm trying to create a macro so that two columns are inserted every 12
columns starting with Column C. *Any help would be appreciated. *

Thanks.