³sÄò & ¤£³sÄò ¤§°}¦C³B²z¤è¦¡ex:1~3,5,7,9~11
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
³sÄò & ¤£³sÄò ¤§°}¦C³B²z¤è¦¡ex:1~3,5,7,9~11
¦U¦ì¤j¤j¦pÃD,°}¦C¤ºªº¼Æ¦r¤w¸g·|¨Ì·Ó¼Æ¦r¤j¤p¶i¦æ±Æ§Ç,¥Ñ¤p¦Ü¤j
¦ýn¦p¦ó¹F¨ì¥H¤U®ÄªG©O~?(°}¦Cªø«×¤£¤@©w)
°²³]°}¦C¬°
1,2,3,5,7,9,10,11 =>1~3,5,7,9~11
1,11=>1,11
5,6,8,9=>5~6,8~9
¤]´N¬O¤W¤@ӼƦr»P³oӼƦr¬O³sÄòªº´Nn¥Î"~"ªí¥Ü,¥B¬Ù²¤¤¤¶¡¼Æ¦r
¦ýY¤£¬O³sÄòªº,«h¥H","Åã¥Ü,¥B¤£±o¬Ù²¤¼Æ¦r |
|
PKKO
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¦U¦ì¤j¤j¦pÃD,°}¦C¤ºªº¼Æ¦r¤w¸g·|¨Ì·Ó¼Æ¦r¤j¤p¶i¦æ±Æ§Ç,¥Ñ¤p¦Ü¤j
¦ýn¦p¦ó¹F¨ì¥H¤U®ÄªG©O~?(°}¦Cªø«×¤£¤@©w ...
PKKO µoªí©ó 2014-11-16 05:04 - Sub nn()
- Dim iI%
- Dim lL&
- Dim sStr$
- Dim vA, vB
-
- 'vA = Array(1, 2, 3, 5, 7, 9, 10, 11)
- 'vA = Array(1, 11)
- vA = Array(5, 6, 8, 9)
- ReDim vB(0)
- lL = vA(0)
- sStr = lL
- For iI = 1 To UBound(vA)
- If vA(iI) <> lL + 1 Then
- If vA(iI - 1) <> sStr Then sStr = sStr & "~" & vA(iI - 1)
- vB(UBound(vB)) = sStr
- ReDim Preserve vB(UBound(vB) + 1)
- sStr = vA(iI)
- End If
- lL = vA(iI)
- Next
- If vA(UBound(vA)) <> sStr Then sStr = sStr & "~" & vA(iI - 1)
- vB(UBound(vB)) = sStr
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
¦^´_ 2# luhpro
·PÁ¤j¤jªº¦^ÂÐ,¦ýµLªk¦¨¥\Åã¥Ü,³Ì«áµ²ªG¥u·|¥X²{¥½´X½X¦Ó¤w |
|
PKKO
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-11-17 16:08 ½s¿è
¦^´_ 3# PKKO
¸Õ¸Õ¬Ý- Option Explicit
- '1,2,3,5,7,9,10,11 =>1~3,5,7,9~11
- Sub Ex()
- Dim Ar(), i As Integer, S As String, Msg As Boolean
- Ar = Array(1, 2, 3, 5, 6, 9, 10, 11, 15)
- S = Ar(0)
- For i = 0 To UBound(Ar)
- If i = UBound(Ar) Then
- If Ar(i) - 1 = Ar(i - 1) Then S = S & Ar(i)
- ElseIf Ar(i) + 1 <> Ar(i + 1) Then
- If Msg Then S = S & Ar(i) & "," & Ar(i + 1)
- If Msg = False Then S = S & "," & Ar(i + 1)
- Msg = False
- ElseIf Ar(i) + 1 = Ar(i + 1) Then
- Msg = True
- S = S & IIf(Right(S, 1) <> "~", "~", "")
- End If
- Next
- MsgBox S
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
¦^´_ 4# GBKEE
·PÁª©¤j,§¹¥þ¥¿½T!,¥B§¹¥þ©ú¥Õ¤F!! |
|
PKKO
|
|
|
|
|
- ©«¤l
- 181
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 197
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2000
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2014-3-9
- ³Ì«áµn¿ý
- 2024-4-29
|
¦^´_ GBKEE
·PÁª©¤j,§¹¥þ¥¿½T!,¥B§¹¥þ©ú¥Õ¤F!!
PKKO µoªí©ó 2014-11-17 22:46
§Ú«Ü¦n©_
¬°¦ó luhpro¤jªº , §A·|µLªk¦¨¥\
§Ú¸ÕµÛokªº |
|
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
Dear ¥u·|¥X²{§À¼Æ(8~9)- Sub nn()
- Dim iI%
- Dim lL&
- Dim sStr$
- Dim vA, vB
-
- 'vA = Array(1, 2, 3, 5, 7, 9, 10, 11)
- 'vA = Array(1, 11)
- vA = Array(1, 6, 8, 9)
- ReDim vB(0)
- lL = vA(0)
- sStr = lL
- For iI = 1 To UBound(vA)
- If vA(iI) <> lL + 1 Then
- If vA(iI - 1) <> sStr Then sStr = sStr & "~" & vA(iI - 1)
- vB(UBound(vB)) = sStr
- ReDim Preserve vB(UBound(vB) + 1)
- sStr = vA(iI)
- End If
- lL = vA(iI)
- Next
- If vA(UBound(vA)) <> sStr Then sStr = sStr & "~" & vA(iI - 1)
- vB(UBound(vB)) = sStr
- MsgBox vB(UBound(vB))
- End Sub
½Æ»s¥N½X ¦^´_ 6# bobomi |
|
PKKO
|
|
|
|
|
- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 253
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-22
|
- Sub ex()
- Dim Ay()
- ar = Array(1, 2, 3, 5, 7, 9, 10, 11, 13, 14, 15) '¤£³sÄò°}¦C
- For i = 0 To UBound(ar) - 1 ''¤£³B²z³Ì«á¤¸¯À
- j = i
- x = ar(j)
- Do Until ar(j) + 1 <> ar(j + 1)
- j = j + 1
- If j = UBound(ar) Then Exit Do
- Loop
- y = ar(j)
- i = j
- ReDim Preserve Ay(s)
- Ay(s) = IIf(x = y, x, x & "~" & y)
- s = s + 1
- Next
- If j = UBound(ar) - 1 Then '³B²z³Ì«á¤¸¯À
- ReDim Preserve Ay(s)
- Ay(s) = ar(UBound(ar))
- End If
- MsgBox Join(Ay, ",")
- End Sub
½Æ»s¥N½X ¦^´_ 7# PKKO |
|
¾Ç®üµL²P_¤£®¢¤U°Ý
|
|
|
|
|
- ©«¤l
- 549
- ¥DÃD
- 152
- ºëµØ
- 0
- ¿n¤À
- 691
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-10
- ³Ì«áµn¿ý
- 2022-9-7
|
·PÁ¨â¦ì¶Wª©ªº«ü±Ð,¥H¤Îbobomi ªº´£¿ô,ì¨Ó¬O¤p§Ì²¨©¿¤F,·P®¦!! |
|
PKKO
|
|
|
|
|