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

[µo°Ý] VBA¼Æ¦r¾ã¦X¦b¤@°_

[µo°Ý] VBA¼Æ¦r¾ã¦X¦b¤@°_

¥»©«³Ì«á¥Ñ adrian_9832 ©ó 2018-3-1 21:34 ½s¿è

¦U¦ì¤j¤j¦n §Ú·Q½Ð°Ý¤@¤U ¥ÎVBA «ç»ò¥i¥H¹ï¶¶§Çªº¼Æ¦r¶i¦æ¾ã²z

¤ñ¦p 246517 246518 246519   Åܦ¨ 24651(7-9) ³o¼Ë     ½Ð¦U¦ì¤j¤j©ç±Ð

¨D¤j¤jÀ°¦£.......

TOP

Sub GO_______________()

MsgBox Join(¼Æ¦rÂkÃþ(Array(246517, 246518, 246519), 1), vbCrLf)
MsgBox Join(¼Æ¦rÂkÃþ(Array(246299, 246217, 246517, 246518, 246519), 2), vbCrLf)


End Sub



Public Function ¼Æ¦rÂkÃþ(NumAR, ByVal ¦ì¼Æ As Long)
' ¦ì¼Æ need >= 0

Set c_max = CreateObject("Scripting.Dictionary")
Set c_min = CreateObject("Scripting.Dictionary")

For Each n In NumAR
     root = n \ (10 ^ ¦ì¼Æ)
     n = n Mod (10 ^ ¦ì¼Æ)
     If Not c_max.exists(root) Then
            c_max(root) = n
            c_min(root) = n
     End If
     If n > c_max(root) Then c_max(root) = n
     If n < c_min(root) Then c_min(root) = n
Next


For Each root In c_max
     c_max(root) = root & "(" & c_min(root) & "-" & c_max(root) & ")"
Next

¼Æ¦rÂkÃþ = c_max.items

End Function

TOP

¤j¤j §A¯uªº¦n¼F®`...... ÁÂÁ§AªºÀ°§U

TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

¼Ó¤Wªº¤j¤j ÁÂÁ§AªºBLOG   ¦³¦n¦h¤£¦Pªº¨ç¼Æ¨Ò¤l

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD