- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¦^´_ 16# ã´£³¡ªL
ÁÂÁ«e½ú
«á¾Ç¥Î¤ñ¸û²Âªº¤èªk½m²ß°}¦C»P¦r¨å!
½Ð«e½ú¼·ªÅ«ü¥¿¨Ã«ü¾É!ÁÂÁÂ
Option Explicit
Sub °}¦C»P¦r¨å½m²ß()
Dim Arr, N&, i&, Y, A&, S, TT$
Dim B#, j&, K%, P$, Q, Ra
Set Y = CreateObject("Scripting.Dictionary")
S = Timer
[O4:AA20000].Clear
Set Y = CreateObject("Scripting.Dictionary")
Arr = Range([M4], Cells(Rows.Count, 1).End(xlUp).Offset(1))
ReDim Brr(1 To UBound(Arr), 1 To 13)
For i = 2 To UBound(Arr) - 1
TT = Arr(i, 1) & Arr(i, 4) & Arr(i, 8)
Y(A & "|" & TT & "|" & i) = i
Y(A & "|" & TT) = Y(A & "|" & TT) + 1
If Arr(i + 1, 1) = "®y¼Ð" Then
A = i + 1
i = A
End If
Next
For i = 1 To UBound(Arr) - 1
If i = A Then
N = A - 1
End If
TT = Arr(i, 1) & Arr(i, 4) & Arr(i, 8)
If Y("0|" & TT) = Y(A & "|" & TT) And i <> 1 And i <> A Then
ElseIf Y("0|" & TT) > 1 Then
Y("0|" & TT) = Y("0|" & TT) - 1 'Y¬Û¦P!¯d³Ì«á¤@µ§
ElseIf Y(A & "|" & TT) > 1 Then
Y(A & "|" & TT) = Y(A & "|" & TT) - 1 'Y¬Û¦P!¯d³Ì«á¤@µ§
Else
N = N + 1
For j = 1 To 13
Brr(N, j) = Arr(i, j)
Next
End If
Next
With [O4:AA4].Resize(UBound(Brr))
.NumberFormatLocal = "@"
.Value = Brr
.Borders.LineStyle = 1
End With
MsgBox Timer - S & " ’"
End Sub |
|