|
楼主 |
发表于 2010-4-6 16:34
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
原帖由 lbl016 于 2010-4-5 21:45 发表
Sub test2()
Dim Arr1, Arr2
Dim N As Integer
Arr1 = Split("A,B,C,D", ",")
Arr2 = Split("C,D,B,A", ",")
Application.ScreenUpdating = False
For N = LBound(Arr1) To UBound(Arr1)
With Worksheets ...
Sub test2()
Dim Arr1, Arr2
Dim N As Integer
Arr1 = Split("A,B,C,D", ",")
Arr2 = Split("C,D,B,A", ",")
Application.ScreenUpdating = False
For N = LBound(Arr1) To UBound(Arr1)
With Worksheets("目标表")
Worksheets("源表").Columns(Arr1(n)).Copy
.Columns(Arr2(n)).Insert
End With
Next N
Application.ScreenUpdating = true
End Sub |
|