- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 14# jsc0518
µ{¦¡×§ï¦p¤U¡An©ñ¦b¤u§@ªí©Î¼Ò²Õ³£¥i¥H¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ¡C
Sub test5()
Dim Arr, xD, xD1, T1, TT, i&
Set xD = CreateObject("Scripting.Dictionary")
Set xD1 = CreateObject("Scripting.Dictionary")
With Sheets("ú®w¶q")
Arr = .Range(.[e1], .[y65536].End(3))
For i = 2 To UBound(Arr)
T1 = Arr(i, 1): TT = Arr(i, 1) & Arr(i, 2)
If Not xD.Exists(TT) Then
xD(TT & "") = xD(TT & "") + 1
xD(T1 & "") = xD(T1 & "") + xD(TT & "")
End If
xD1(T1 & "") = xD1(T1 & "") + Arr(i, 21)
Next
End With
With Sheets("Analysis")
Arr = .Range(.[b2], .[a65536].End(3))
For i = 1 To UBound(Arr)
T1 = Arr(i, 1)
Arr(i, 1) = xD(T1 & "")
Arr(i, 2) = xD1(T1 & "")
Next
.Range("b2").Resize(UBound(Arr), 2) = Arr
End With
End Sub |
|