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

[µo°Ý] ¼Æ²Õ¬A¸¹¤ºªº¼Æ¦r ¤À§é

[µo°Ý] ¼Æ²Õ¬A¸¹¤ºªº¼Æ¦r ¤À§é

¤j®a¦n ½Ð°Ý¤@­Ó¼Æ²Õ ¤ñ¦p¥H¤U :

A1
2301(1,3,5-7,9-0)   


«ç»ò¥i¥H¥Î¤èµ{¦¡©ÎVBA Åܦ¨¥H¤U³o¼Ëµ²ªG ¦]¬°¬A¸¹¤ºªº¸¹½X¤£¤@­P ¦³®É¬O , ¦³®É¬O-                 ½Ð¦U¦ì«ü±Ð
23011
23013
23015
23017
23019
23010

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-4 00:53 ½s¿è

¦^´_ 1# adrian_9832

­n¥Î¤@¨Ç¸Ñ¦r¦êªº§Þ¥©
VBA¦p¤U¡A§âA1¸ÑªR«á©ñ¨ìBÄæ
¤½¦¡§ä§O¤HÀ°¦£§a.......§Ú¤u§@ªí¨ç¼Æ·|ªº¤£¦h
¥uª¾¹Dinstr ¥i¥H¥Î find ¨ú¥N
¦ý¬Osplit ¤£ª¾¹D¤u§@ªí¨ç¼Æ¦³¨S¦³Ãþ¦üªº
  1. Sub TEST()
  2. Ar = Split(Replace([A1], "-", ","), ",")
  3. Ar(0) = Right(Ar(0), Len(Ar(0)) - InStr(Ar(0), "("))
  4. An = UBound(Ar)
  5. Ar(An) = Left(Ar(An), Len(Ar(An)) - 1)
  6. [B1].Resize(An + 1) = Application.Transpose(Ar)
  7. End Sub
½Æ»s¥N½X
AAA.rar (10.16 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-4 01:07 ½s¿è

¦^´_ 2# n7822123


§ó¥¿! §Ñ°O¥[«e­±ªº¼Æ¦r¤F
  1. Sub TEST()
  2. Ar = Split(Replace([A1], "-", ","), ",")
  3. A0 = Left(Ar(0), InStr(Ar(0), "(") - 1)
  4. Ar(0) = Right(Ar(0), Len(Ar(0)) - InStr(Ar(0), "("))
  5. An = UBound(Ar)
  6. Ar(An) = Left(Ar(An), Len(Ar(An)) - 1)
  7. For i = 0 To An
  8.   Ar(i) = A0 & Ar(i)
  9. Next i
  10. [B1].Resize(An + 1) = Application.Transpose(Ar)
  11. End Sub
½Æ»s¥N½X
BBB.rar (10.53 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

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

TOP

9-0 ???
¦³¨S¦³9-2¤§Ãþªº,
Á|ªº¨Ò¤l¥u¦³¤@­Ó, µ{¦¡¼g¤F¤]¬O¥Õ¼g,
¤W¶Ç¸û§¹¾ãªº¼Æ¾Ú§a!!!

TOP

  1. Sub zz()
  2. Dim s$
  3. s = "2301(1,3,5-7,9-0)"
  4. With CreateObject("vbscript.regexp")
  5.     .Pattern = "\d+"
  6.     .Global = True
  7.     k = Split(s, "(")
  8.     If .test(k(1)) Then
  9.         Set t = .Execute(k(1))
  10.         For Each x In t
  11.             Debug.Print k(0) & x
  12.         Next
  13.     End If
  14. End With
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# adrian_9832


¨SªkÁÙ­ì§a
¦p¦óª¾¹D 23016 ¤£¬O¨ä¤¤¤@²Õ¸Ñ


23011
23013
23015
23016
23017
23019
23010

TOP

5-7
À³«ü5.6.7§a!

TOP

§Ú¥´¤Ö6¨º­Ó¸¹½X  ©êºp   ¦hÁ¦U¦ì¤j¤j­ÌªºÀ°§U

TOP

23011
23013
23015
23016
23017
23019
23010

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD