- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2017-1-5 20:04 ½s¿è
¦^´_ 2# ziv976688 h0 dl3d04d04
°Ñ¦Ò¬Ý¬Ý¡I
¦]§Ú¤£À´³o¹CÀ¸³W«h¡A¥u±N§Aªºµ{¦¡½X²¤¤©¸Õ¼g¡A¤£ª¾¥i§_¡H- Sub Ex()
- Dim startrang%, endrang%, tim!, In1rr As Variant, In2rr As Variant, StrRng$, Ncount$, Number
- Dim RrngA$, Nrange$, CrngA$, RrngB$, CrngB$, i%, j%, y%, num$, Order$, NUMX$
- Dim m1%, sta%
- StrRng = "1" ' InputBox("½Ð¿é¤JDATA!¦U·j´M¤ñ¹ïªº°_©l´Á¼Æ", "¿é¤J´Á¼Æ")
- Nrange = "280" ' InputBox("½Ð¿é¤JDATA!¦U·j´M¤ñ¹ïªº¨´¤î(¶}¼ú)´Á¼Æ", "¿é¤J´Á¼Æ")
- num = "50" ' InputBox("½Ð¿é¤J®ÄªGÀÉA¡JH½Æ»s½d³òªº´Á¶Z¼Æ", "¿é¤J¶Z´Á¼Æ")
- RrngA = "253,268,273" ' InputBox("½Ð¿é¤J¦U"²Ä¤@Ó"¤ñ¹ïªº"°ò·Ç´Á¼Æ", "¿é¤J²Ä¤@Ó´Á¼Æ")
- CrngA = "1-2" ' InputBox("½Ð¿é¤J¦U"²Ä¤@Ó"¤ñ¹ïªº7Äæ¨ú¥ô1~6¤§Äæ¦ì¼Æ", "¿é¤JÄæ¦ì¼Æ(1~6)")
- RrngB = "249-250,263,268" ' InputBox("½Ð¿é¤J¦U"²Ä¤GÓ"¤ñ¹ïªº"°ò·Ç´Á¼Æ", "¿é¤J²Ä¤GÓ´Á¼Æ")
- CrngB = "1-2" ' InputBox("½Ð¿é¤J¦U"²Ä¤GÓ"¤ñ¹ïªº7Äæ¨ú¥ô1~6¤§Äæ¦ì¼Æ", "¿é¤JÄæ¦ì¼Æ(1~6))
- Order = "" ' InputBox("½Ð¿é¤J¦A¿z¿ïÅÞ¿è±ø¥óªº°_¨´§Ç¸¹", "¿é¤J§Ç¸¹(1~99)©Î¤£¼W¥[(«öEnter)")
- Number = "04,12,20-22,30,34,38,42,47" ' InputBox("½Ð¿é¤J¦U«ü©wªº¸¹½X", "¿é¤J¸¹½X(1~49)")
- Ncount = "2-3" ' InputBox("½Ð¿é¤JÅçÃÒª©ªº³sÄò¦¸¼Æ", "¿é¤J¦¸¼Æ(2~10)")
-
- tim = Timer
- [L1:L10] = ""
- NUMX = num
- Application.DisplayAlerts = False
- On Error Resume Next ' ±N¿ù»~³B²zªº¤è¦¡³]¬°¡uÄ~Äò¤U¤@¦æ¡v¡C
- Application.ScreenUpdating = False ' ¦bI´º¤U°õ¦æ
-
- ' ...............
- In1rr = ToSplit(Nrange, ",")
-
- ' ................
- In2rr = ToSplit(NUMX, ",")
- ' ................
-
- ' .......................
- [L1] = Nrange & "=" & Format((Timer - tim) / 24 / 60 / 60, "hh:mm:ss")
- [L2] = "DATA!¦U·j´M¤ñ¹ïªº°_©l´Á¼Æ=" & StrRng
- [L3] = "A¡JH(¶}¼úª©)ªº´Á¶Z¼Æ=" & NUMX
- [L4] = "¤ñ¹ï°ò·Ç´Á¼ÆA=" & RrngA
- [L5] = "Äæ¦ì¼ÆA=" & CrngA
- [L6] = "¤ñ¹ï°ò·Ç´Á¼ÆB=" & RrngB
- [L7] = "Äæ¦ì¼ÆB=" & CrngB
- [L8] = "¼W¥[¦A¿z¿ïÅÞ¿è±ø¥óªº§Ç¸¹=" & Order
- [L9] = "¦U«ü©w¦P¸¹½X=" & Number
- [L10] = "ÅçÃÒª©ªº³sÄò¦¸¼Æ=" & Ncount
- End Sub
- Function ToSplit(txt As String, sp As String, Optional dash As String = "-") As String()
- Dim FullNameComma As Variant, cts As Integer, nxt As Integer
- Dim lf As Integer, rt As Integer, spl As String
- FullNameComma = Split(txt, sp)
- spl = ""
- For cts = LBound(FullNameComma) To UBound(FullNameComma)
- nxt = InStr(FullNameComma(cts), dash)
- If nxt > 0 Then
- lf = Val(Left(FullNameComma(cts), nxt - 1))
- rt = Val(Mid(FullNameComma(cts), nxt + 1))
- For nxt = lf To rt
- spl = IIf(spl = "", CStr(nxt), spl & sp & CStr(nxt))
- Next
- Else
- spl = IIf(spl = "", FullNameComma(cts), spl & sp & FullNameComma(cts))
- End If
- Next cts
-
- ToSplit = Split(spl, sp)
- End Function
½Æ»s¥N½X |
|