- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
²`¤J¬ã¨s¯Ó®É:
³æ´N§PÂ_»P«Ø¥ß¦r¨å®w!´N¯Ó®É0.6¬í
Option Explicit
Sub TEST_4()
Dim Arr, i&, j&, T, V, Y, U1, U2, S, P$
S = Timer
Set Y = CreateObject("Scripting.Dictionary")
Arr = Range([A1], [m65536].End(xlUp))
[O:O].ClearContents
For i = 1 To UBound(Arr)
V = -9 ^ 9
For j = 1 To UBound(Arr, 2)
If j < UBound(Arr, 2) Then
U1 = Arr(i, j): U2 = Arr(i, j + 1)
If U1 * U2 >= 0 Then
Y(U1) = IIf(Y(U1) <> 1, Abs((U2) - (U1)), Y(U1))
Y(U2) = IIf(Y(U2) <> 1, Abs((U2) - (U1)), Y(U1))
End If
End If
Next
Y.RemoveAll
Next
MsgBox Timer - S & "’"
End Sub
¥h°£IIF§PÂ_! 0.3¬í!
Option Explicit
Sub TEST_4()
Dim Arr, i&, j&, T, V, Y, U1, U2, S, P$
S = Timer
Set Y = CreateObject("Scripting.Dictionary")
Arr = Range([A1], [m65536].End(xlUp))
[O:O].ClearContents
For i = 1 To UBound(Arr)
V = -9 ^ 9
For j = 1 To UBound(Arr, 2)
If j < UBound(Arr, 2) Then
U1 = Arr(i, j): U2 = Arr(i, j + 1)
If U1 * U2 >= 0 Then
Y(U1) = ""
Y(U2) = ""
End If
End If
Next
Y.RemoveAll
Next
MsgBox Timer - S & "’"
End Sub
¥ú¬O¤ÏÂЦr¨å«Ø¥ß/²MªÅ!´Nn 0.25¬í!
Option Explicit
Sub TEST_4()
Dim Arr, i&, j&, T, V, Y, U1, U2, S, P$
S = Timer
Set Y = CreateObject("Scripting.Dictionary")
Arr = Range([A1], [m65536].End(xlUp))
[O:O].ClearContents
For i = 1 To UBound(Arr)
V = -9 ^ 9
For j = 1 To UBound(Arr, 2)
If j < UBound(Arr, 2) Then
U1 = Arr(i, j)
Y(U1) = ""
End If
Next
Y.RemoveAll
Next
MsgBox Timer - S & "’"
End Sub |
|