- ©«¤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
|
¦^´_ 1# oak0723-1
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Brr, xD, T
Set xD = CreateObject("Scripting.Dictionary")
With Range("h6:h" & Cells(Rows.Count, 8).End(xlUp).Row)
Brr = .Value
.Sort key1:=.Item(1), Order1:=2, Header:=2
Arr = .Value
.Value = Brr
End With
For i = 1 To UBound(Arr)
T = Arr(i, 1): If T = "" Then GoTo 98
If xD(T) = "" Then: n = n + 1: xD(T) = n
98: Next
For i = 1 To UBound(Brr)
T = Brr(i, 1)
If T = "" Then Brr(i, 1) = 0: GoTo 99
Brr(i, 1) = xD(T)
99: Next
Range("i6").Resize(UBound(Brr)) = Brr
End Sub |
|