|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 准提部林 于 2018-1-30 15:55 编辑
Sub TEST()
Dim xArea As Range, xR As Range, R&, xS As Range, i&
[AA:AA].Clear
Application.ScreenUpdating = False
R = Cells(Rows.Count, 1).End(xlUp).Row
Set xArea = Range("A1:O" & R)
Set xS = Range("S1:S" & R)
Set xR = [Z1]
For i = 1 To xArea.Columns.Count
If i = 11 Then GoTo 101
Union(xArea.Columns(i), xS).Copy xR
xR.Resize(R, 2).Sort Key1:=xR, Order1:=xlAscending, Header:=xlNo
Set xR = xR(R + 1)
101: Next i
[Z:Z].Clear
End Sub
借z列排序,再清除,
若太慢再說~~
|
|