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

[µo°Ý] Åܼƥ[½s¸¹

[µo°Ý] Åܼƥ[½s¸¹

½Ð°Ý¦U¦ì°ª¤â

§Ú¥HMid¨ç¼Æ¨ú±o¦r¦ê¨Ã©w¸q¬°adate¡Aadate§t¦³¦h­Ó¥ª¬A¸¹¡A²{±ý¨ú±o¨C¤@­Ó¥ª¬A¸¹ªº¦ì¸m¡G

PL1 = InStr(adate, "(")
For i = 2 To 10
j = i - 1
PLi = InStr(1 + PRj, adate, "(")
Next

¦ý¤W­zµ{¦¡½XµLªk¨ú±o¥ª¬A¸¹ªº¦ì¸m¡A¨Ò¦p¦r¦ê¤¤²Ä¤G­Ó¥ª¬A¸¹PL2¡A½Ð°ÝÀ³´Â¬Æ»ò¤è¦V§ï¼g?ÁÂÁÂ

¦^´_ 1# swede
  1. Sub ZZ()
  2. '²Ä1­Ó(ªº¦ì¸m©ñ¦bARR(1),²Ä2­Ó(ªº¦ì¸m©ñ¦bARR(2)...
  3. Dim ARR(10)                              '¦Ü¦h¥i§ä10­Ó"("
  4. ARR(1) = InStr(1, adate, "(")
  5. For I = 2 To 100                         '¦r¦ê¦Ü¦h100¦r¤¸
  6.   X = InStr(ARR(I - 1) + 1, adate, "(")
  7.   If X <> 0 Then
  8.      ARR(I) = X
  9.      Cells(I, "B") = ARR(I)
  10.   Else:     End
  11.   End If
  12. Next
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# swede

s = 1
For i = 1 To Len(adate) - Len(Replace(adate, "(", ""))
k = InStr(s, adate, "(")
  MsgBox k
  s = k + 1
Next
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁ¨â¦ì¦^ÂСA¦]¬°­n¨ú±o¨C¤@­Ó¥ª¬A¸¹ªº¦ì¸m¡A©Ò¥Hregister313 ªº¼gªk¤ñ¸û²Å¦X§Ú»Ý­nªº¡AÁÂÁ¡C

TOP

¦^´_ 1# swede
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xi As Integer, S
  4.     For xi = 1 To Len(adate)
  5.         If Mid(adate, xi, 1) = "(" Then
  6.         S = IIf(S <> "", S & "," & xi, xi)
  7.         End If
  8.     Next
  9.     If S <> "" Then MsgBox S
  10. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEE ´£¨Ñ¥t¥~¼gªk¡A §Ú·|¸Õ¸Õ¬Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-2-19 10:31 ½s¿è

¦^´_ 4# swede
¥u¹ï¬A¸¹¼Æ¶q°µ´`Àô¡A´î¤Ö°j°é¼Æ
¦P¼Ë¬O¶Ç¦^©Ò¦³¥ª¬A¸¹ªº¦ì¸m
À³¥Î¦p¤U
  1. Sub nn()
  2. Dim Ar()
  3. adate = [A1]
  4. s = 1
  5. For i = 1 To Len(adate) - Len(Replace(adate, "(", ""))
  6. k = InStr(s, adate, "(")
  7.   ReDim Preserve Ar(i - 1)
  8.   Ar(i - 1) = k
  9.   s = k + 1
  10. Next
  11. If InStr(adate, "(") > 0 Then MsgBox Join(Ar, ",") Else MsgBox "¤£§t("
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤f»¡¤@¥y¦n¸Ü¡A¦p¤f¥X½¬ªá¡F¤f»¡¤@¥yÃa¸Ü¦p¤f¦R¬r³D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD