|
- Sub Macro1()
- Dim rng As Range, i&
- Application.ScreenUpdating = False
- For i = 4 To Cells(1, Columns.Count).End(xlToLeft).Column Step 3
- If rng Is Nothing Then Set rng = Cells(1, i) Else Set rng = Union(rng, Cells(1, i))
- Next
- If Not rng Is Nothing And Cells(1, 4) <> "" Then rng.EntireColumn.Insert Shift:=xlToRight
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|