- ©«¤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¿ý
- 2025-1-10
|
¦^´_ 1# aer
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, T$, T1, n&, i&
Set xD = CreateObject("Scripting.Dictionary")
Arr = [A1].CurrentRegion
For i = 2 To UBound(Arr)
If Arr(i, 2) = "" Then GoTo 99
T = Left(Arr(i, 1), 15)
If xD.Exists(T) Then
Arr(xD(T), 2) = Arr(xD(T), 2) + Arr(i, 2)
Else
n = n + 1: xD(T) = n
Arr(n, 1) = T: Arr(n, 2) = Arr(i, 2)
End If
T1 = T1 + Arr(i, 2)
99: Next
[e1].CurrentRegion.Offset(1) = ""
[e2].Resize(n, 2) = Arr
Range("e" & n + 2) = "¦Xp"
Range("f" & n + 2) = T1
End Sub |
|