Sub 按钮1_单击() Application.ScreenUpdating = False t = Timer 'Dim i&, j&, k&, p&, rng, rng1, ary() Dim I As Long, J As Long, K As Long, P As Long Dim RNG, RNG1, ARY() Dim ARR As Range Range("g:g").ClearContents P = Range("a65536").End(xlUp).Row Set ARR = Range("a1:a" & P) ReDim ARY(1 To P, 0) RNG = ARR ARR.Sort Key1:=ARR(1, 1), Order1:=xlAscending, Header:=xlNo RNG1 = ARR ARR = RNG ARY(1, 0) = RNG1(1, 1) For I = 2 To P If RNG1(I, 1) <> RNG1(I - 1, 1) Then ARY(K + 2, 0) = RNG1(I, 1) K = K + 1 End If Next I Range("g1:g" & P) = ARY t1 = Timer - t MsgBox "用时:" & t1 & "秒" Application.ScreenUpdating = True End Sub ================= 抄来了一段代码: 我想问一问,红色字体的语句是什么意思?
|