ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¤j¶q¸ê®Æ±Æ¦W

¥»©«³Ì«á¥Ñ ML089 ©ó 2021-10-19 16:44 ½s¿è

10¸Uµ§¸ê®Æ¡A°ß¤@­È¦³1¸Uµ§¡A±Æ¦W¤ñ¸û
±Æ§Ç±Ä¥Î Range.Sort   °õ¦æ®É¶¡  0.3"
±Æ§Ç±Ä¥Î System.collections.arraylist    °õ¦æ®É¶¡  0.33"
±Æ§Ç±Ä¥Î Large¨ç¼Æ °õ¦æ®É¶¡ 30"
µ²½× Range.Sort ¤]¤£ºC

­ì¸ê®Æ10¸Uµ§¥u¦³6µ§¬O°ß¤@­È¡A³o¼Ë´ú¤£¥X®Ä²v¡A
¨ä¹ê°ß¤@­È¤p©ó10µ§¥Î¨ç¼Æ¤]¥i¥H 0.3"¡A°ß¤@­È¬°1¸Uµ§»Ý­n46¬í

Sub ±Æ¦WAmoKat()
    tm = Timer
    Set xD = CreateObject("Scripting.Dictionary")
    Arr = Range([h6], [h1].Cells(Rows.Count, 1).End(xlUp))
    For i = 1 To UBound(Arr): xD(Arr(i, 1)) = 0: Next i '¦r¨å²£¥Í°ß¤@­È
    With [i6].Resize(xD.Count) '§Q¥Î Range.Sort ±Æ§Ç
        .Value = Application.Transpose(xD.keys)
        .Sort Key1:=.Item(1), Order1:=xlDescending, Header:=xlNo
    End With
    For i = 1 To xD.Count: xD(Cells(5 + i, "I").Value) = i: Next i '±Æ§Ç§Ç¸¹¼g¤J¦r¨å
    For i = 1 To UBound(Arr)    '¬d¸ß¦r¨å±Æ¦C§Ç¸¹
        If Arr(i, 1) = "" Then Arr(i, 1) = 0 Else Arr(i, 1) = xD(Arr(i, 1))
    Next i
    [i6].Resize(UBound(Arr)) = Arr '¶K¤W¸ê®Æ
    Set xD = Nothing: Erase Arr
    Debug.Print Timer - tm    '0.30"
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD