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

¼Æ¦r¦ê±µ°ÝÃD

¼Æ¦r¦ê±µ°ÝÃD

¦U¦ì¤j­Ó¦n¡G
§Ú·Q½Ð°Ý«È¤á½c¸¹¦ê±µ°ÝÃD¡A°ÝÃDªþ¥ó ¬¡­¶Ã¯1.rar (13.03 KB)
¦]¬°¸ê®Æ«Ü¶Ã¡A¤£ª¾¬O§_¦³vba¥i¥H³B²z¡C
lionliu

¦Û­q¨ç¼Æ¡G¡]¥u¹w³]§Ç¸¹±q¢°¡ã¢²¢¯¢¯¢¯¡^
  1. Function GetNo(xStr$) As String
  2. Dim Ar(0 To 3000), A, i%, N1, N2, T, TT$
  3. For Each T In Split(xStr, ",")
  4.     A = Split(0 & Trim(T) & "~0~0", "~")
  5.     For i = A(0) To A(1)
  6.         Ar(i) = 1
  7.     Next
  8. Next
  9. For i = 1 To 3000
  10.     If Ar(i) = 1 Then
  11.        If N1 = "" Then N1 = i Else N2 = i
  12.     Else
  13.        If N1 <> "" Then TT = TT & "," & N1 & IIf(N2 = "", "", "-" & N2)
  14.        N1 = "": N2 = ""
  15.     End If
  16. Next
  17. GetNo = Mid(TT, 2)
  18. End Function
½Æ»s¥N½X
¢Ð¢±¤½¦¡¡G
=GetNo(A2)
¡@
¦r¦ê¤Óªø¥i¯à³y¦¨¿ù»~µ²ªG¡ã¡ã
¡@
¡@

TOP

¦^´_ 2# ­ã´£³¡ªL


谢谢­ã¤j§Ú¦A试¤@¤U
lionliu

TOP

        ÀR«ä¦Û¦b : ¨C¤ÑµL©Ò¨Æ¨Æ¡A¬O¤H¥Íªº®ø¶OªÌ¡A¿n·¥¡B¦³¥Î¤~¬O¤H¥Íªº³Ð³yªÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD