- ©«¤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
|
¦^´_ 4# lilizzzz
Sub tt()
Dim xD, Arr, i&, j%, N& '
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([¤u§@ªí1!U1], [¤u§@ªí1!A65536].End(3)) 'ì¸ê®Æ¸Ë¤J¼Æ²Õ
For i = 1 To UBound(Arr)
If Not xD.exists(Arr(i, 1)) Then
N = N + 1 'pºâ¤£«½Æ°ß¤@Ȫº¦¸¼Æ
xD(Arr(i, 1)) = N '¤£«½Æ°ß¤@Ȫº¸Ë¤J¦r¨å
For j = 1 To UBound(Arr, 2) '±N°ß¤@Ȫº¨ä¥¦Äæ¦ìªºÈ¸Ë¤J¼Æ²Õ
Arr(N, j) = Arr(i, j)
Next
End If
Next
Range("A1").Resize(UBound(Arr), UBound(Arr, 2)) = "" '²M°£ì¸ê®Æ
Range("A1").Resize(N, UBound(Arr, 2)) = Arr '¶K¤W°ß¤@ȬÛÃöªºÈ
End Sub |
|