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

[µo°Ý] ¦b¨C­Ó«ü©wªº®É¶¡´¡¤J¬ÛÃö¼Æ¾Ú(¤w¸Ñ¨M)

¦AÁÂÁÂHsieh ¤j¤jGBKEE ¤j¤j²Ó¤ß«ü¾É!

TOP

¥»©«³Ì«á¥Ñ cdkee ©ó 2012-4-30 16:06 ½s¿è

¦^´_ 8# register313


    ·PÁÂregister313¤j¤j¡A¤µ¦^¥i¶]¤F!
¦ý·í¼Æ¾Ú¦³2­Ó¤ë©Î¥H¤W¡A¨C­Ó¤ë²Ä1¤éªº¤é´Á¥X¨Ó¦³ÂI°ÝÃD...
TEST2.rar (991.16 KB)

TOP

¦^´_ 12# cdkee

¦³2¦æ¥[¤J.text

Test2.rar (838.28 KB)

TOP

¦^´_ 13# register313


    ÁÂÁ¤j¤jªº¦^ÂÐ!
¦ý·s´¡¤Jªº¤é¤lFORMAT»P­ì¥»ªº¤£¦P¡AÀ³¦p¦ó§ï°Ê¡AÁÂÁÂ!

TOP

¦^´_ 14# cdkee

§A12¼Óµ¹§ÚªºÀÉ®×
1.AÄ檺¤é´Á®æ¦¡¦³2ºØ,©Ò¥HJÄ檺¤é´Á®æ¦¡¤]¦³2ºØ
  AÄ檺¤é´Á®æ¦¡­Y§ï¬°1ºØ,JÄ檺¤é´Á®æ¦¡´N¥u¦³1ºØ
  Á`¤§JÄ檺¤é´Á®æ¦¡»PAÄ檺¤é´Á®æ¦¡¬Û¦P
2.§A§ï¬°§R°£1¦C,¦³¨Çµ{¦¡½X¨S§ï¨ì,½Æ»sªº¼Æ¾Ú¬O¿ùªº

¤U¦CÀɮצA¸Õ¬Ý¬Ý
Test2.rar (436.57 KB)

TOP

¦^´_ 15# register313


    ÁÂÁ¤j¤jªº¦A¤T«ü¾É!
²×©ó¶]¶¶¤F¡A®Ú¾Ú¤j¤j±Ðªº¡A¸Õ¤F¦h¦¸¡A¤]¥[¤J¥i´¡¤J2¦æ¼Æ¾Úªºª©¥»¡AÁÂÁ¦U¦ì¤j¤j!
Test4.rar (434.18 KB)

TOP

¦^´_ 16# cdkee


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò,ÁÂÁ¦U¦ì«e½ú
«á¾Ç½m²ß¥H2­Ó°}¦C¤è¦¡³B¸Ì,½Ð¦U¦ì«e½ú«ü¾É

°õ¦æ«e:


°õ¦æµ²ªG:


Option Explicit
Sub TEST()
Dim Brr, Crr, Z, i&, N&, j&, T$
Brr = Range([G1], Cells(Rows.Count, "A").End(3))
ReDim Crr(1 To UBound(Brr) * 2, 1 To UBound(Brr, 2))
For i = 1 To UBound(Brr)
   T = Brr(i, 2)
   If InStr("/9:16:000/13:31:000/", "/" & T & "/") Then
      N = N + 1
      Crr(N, 1) = Brr(i, 1): Z = Split(T, ":")
      Crr(N, 2) = Join(Array(Z(0), Z(1) - 1, Z(2)), ":")
      For j = 3 To 6
         Crr(N, j) = Brr(i, 3)
      Next
   End If
   N = N + 1
   For j = 1 To UBound(Brr, 2)
      Crr(N, j) = Brr(i, j)
   Next
Next
[J1].Resize(N, UBound(Crr, 2)) = Crr
Erase Brr, Crr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 17# Andy2483


    «á¾Ç©µ¦ù½m²ß¥H¦r¨å+¤Gºû°}¦C+¤@ºû°}¦C ³B¸Ì,½Ð¦U¦ì«e½ú«ü¾É

Option Explicit
Sub TEST_2()
Dim Brr, Z, Y, B, i&, N&, j&, T$, A(6)
Set Y = CreateObject("Scripting.Dictionary")
Brr = Range([G1], Cells(Rows.Count, "A").End(3))
For i = 1 To UBound(Brr)
   T = Brr(i, 2)
   If InStr("/9:16:000/13:31:000/", "/" & T & "/") Then
      N = N + 1: B = A
      B(0) = Brr(i, 1): Z = Split(T, ":")
      B(1) = Join(Array(Z(0), Z(1) - 1, Z(2)), ":")
      For j = 2 To 5
         B(j) = Brr(i, 3)
      Next
      Y(N) = B
   End If
   N = N + 1: B = A
   For j = 0 To UBound(B)
      B(j) = Brr(i, j + 1)
   Next
   Y(N) = B
Next
[J1].Resize(N, UBound(A) + 1) = Application.Transpose(Application.Transpose(Y.Items))
Erase Brr, B, A: Set Y = Nothing
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-3-13 12:01 ½s¿è

¦^´_ 18# Andy2483


    ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾Ç½Æ²ß¤ß±o¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

Option Explicit
Sub TEST_1()
Dim Brr, Crr, Z, i&, N&, j&, T$
'¡ô«Å§iÅܼÆ:(Brr,Crr,Z)¬O³q¥Î«¬ÅܼÆ,(i,N,j)¬Oªø¾ã¼ÆÅܼÆ,T¬O¦r¦êÅܼÆ
Brr = Range([G1], Cells(Rows.Count, "A").End(3))
'¡ô¥OBrr³o³q¥Î«¬ÅܼƬO¤Gºû°}¦C,¥H[G1]¨ìAÄæ³Ì«á¦³¤º®eÀx¦s®æ­È±a¤J
ReDim Crr(1 To UBound(Brr) * 2, 1 To UBound(Brr, 2))
'¡ô«Å§iCrr¬O¤Gºû°}¦C,½d³ò¤j¤p,Áa¦V±q1¨ìBrr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹¼Æªº2­¿,
'¾î¦V±q1¨ì Brr°}¦C¾î¦V³Ì¤j¯Á¤ÞÄ渹¼Æ

For i = 1 To UBound(Brr)
'¡ô³]¶¶°j°é!i±q1¨ì Brr°}¦CÁa¦V¬°¤j¯Á¤Þ¦C¸¹
   T = Brr(i, 2)
   '¡ô¥OT³o¦r¦êÅܼƬO i°j°é¦C²Ä2ÄæBrr°}¦C­È
   If InStr("/9:16:000/13:31:000/", "/" & T & "/") Then
   '¡ô¦pªGTÅܼƪº«e«á¦U³s±µ"/"²Å¸¹«áªº·s¦r¦ê,¦b«ü©wªº¦r¦ê¸Ì³Q¥]§t¤F??
   '«ü©wªº¦r¦ê:"/9:16:000/13:31:000/"

      N = N + 1
      '¡ô¥ON³oªø¾ã¼ÆÅܼƲ֥[1
      Crr(N, 1) = Brr(i, 1): Z = Split(T, ":")
      '¡ô¥ONÅܼƦC²Ä1ÄæCrr°}¦C­È¬O i°j°é¦C²Ä1ÄæBrr°}¦C­È:
      '¥OZÅܼƬO¤@ºû°}¦C,¥OTÅܼƥH":"¤À³Î«á±a¤J

      Crr(N, 2) = Join(Array(Z(0), Z(1) - 1, Z(2)), ":")
      '¡ô¥ONÅܼƦC²Ä2ÄæCrr°}¦C­È¬O
      '(²Ä0¯Á¤ÞZ°}¦C­È,²Ä1¯Á¤ÞZ°}¦C­È-1,²Ä2¯Á¤ÞZ°}¦C­È)
      '³o¤T­Ó¦r¦ê¥H":"¦ê±µ¦¨·s¦r¦ê

      For j = 3 To 6
      '¡ô³]¶¶°j°é!j±q3¨ì6
         Crr(N, j) = Brr(i, 3)
         '¡ô¥ONÅܼƦC²Äj°j°éÄæCrr°}¦C­È¬O iÅܼƦC²Ä3ÄæBrr°}¦C­È
      Next
   End If
   N = N + 1
   '¡ô¥ONÅܼƲ֥[1
   For j = 1 To UBound(Brr, 2)
   '¡ô³]¶¶°j°é!j±q1¨ìBrr°}¦C¾î¦V³Ì¤j¯Á¤ÞÄ渹¼Æ
      Crr(N, j) = Brr(i, j)
      '¡ô¥ONÅܼƦC²Äj°j°éÄæCrr°}¦C­È¬O iÅܼƦC²Äj°j°éÄæBrr°}¦C­È
   Next
Next
[J1].Resize(N, UBound(Crr, 2)) = Crr
'¡ô¥O[J1]ÂX®i¦V¤UNÅܼƦC,ÂX®i¦V¥kCrr¾î¦V³Ì¤j©ÒÄ渹¼Æ,
'³o½d³òÀx¦s®æ­È¥H Crr°}¦C­È±a¤J

Erase Brr, Crr, Z
'¡ô¥OÄÀ©ñÅܼÆ
End Sub

==========================================================

Option Explicit
Sub TEST_2()
Dim Brr, Z, Y, B, i&, N&, j&, T$, A(6)
'¡ô«Å§iÅܼÆ:(Brr,Z,Y,B)¬O³q¥Î«¬ÅܼÆ,(i,N,j)¬Oªø¾ã¼ÆÅܼÆ,T¬O¦r¦êÅܼÆ,
'A¬O¤@ºû°}¦C(0~6)ªÅ°}¦C

Set Y = CreateObject("Scripting.Dictionary")
'¡ô¥OY³o³q¥Î«¬ÅܼƬO ¦r¨å
Brr = Range([G1], Cells(Rows.Count, "A").End(3))
'¡ô¥OBrr³o³q¥Î«¬ÅܼƬO¤Gºû°}¦C,¥H[G1]¨ìAÄæ³Ì«á¦³¤º®eÀx¦s®æ­È±a¤J
For i = 1 To UBound(Brr)
'¡ô³]¶¶°j°é!i±q1¨ì Brr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹
   T = Brr(i, 2)
   '¡ô¥OT³o¦r¦êÅܼƬO i°j°é¦C²Ä2ÄæBrr°}¦C­È
   If InStr("/9:16:000/13:31:000/", "/" & T & "/") Then
   '¡ô¦pªGTÅܼƪº«e«á¦U³s±µ"/"²Å¸¹«áªº·s¦r¦ê,¦b«ü©wªº¦r¦ê¸Ì³Q¥]§t¤F??
   '«ü©wªº¦r¦ê:"/9:16:000/13:31:000/"

      N = N + 1: B = A
      '¡ô¥ON³oªø¾ã¼ÆÅܼƲ֥[1:¥OB³o³q¥Î«¬ÅܼƬOA³oªÅ°}¦C
      B(0) = Brr(i, 1): Z = Split(T, ":")
      '¡ô¥O0¯Á¤Þ¸¹B°}¦C­È¬O i°j°é¦C²Ä1ÄæBrr°}¦C­È:
      '¥OZÅܼƬO¤@ºû°}¦C,¥OTÅܼƥH":"¤À³Î«á±a¤J

      B(1) = Join(Array(Z(0), Z(1) - 1, Z(2)), ":")
      '¡ô¥O0¯Á¤Þ¸¹B°}¦C­È¬O
      '(²Ä0¯Á¤ÞZ°}¦C­È,²Ä1¯Á¤ÞZ°}¦C­È-1,²Ä2¯Á¤ÞZ°}¦C­È)
      '³o¤T­Ó¦r¦ê¥H":"¦ê±µ¦¨·s¦r¦ê

      For j = 2 To 5
      '¡ô³]¶¶°j°é!j±q2¨ì 5
         B(j) = Brr(i, 3)
         '¡ô¥Oj¯Á¤Þ¸¹B°}¦C­È¬O i°j°é¦C²Ä3ÄæBrr°}¦C­È
      Next
      Y(N) = B
      '¡ô¥ONÅܼƬ°key,item¬OBÅܼƯǤJY¦r¨å¸Ì
   End If
   N = N + 1: B = A
   '¡ô¥ONÅܼƲ֥[1 :¥OBÅܼƬOAÅܼÆ
   For j = 0 To UBound(B)
   '¡ô³]¶¶°j°é!j±q0¨ì B°}¦C³Ì¤j¯Á¤Þ¸¹
      B(j) = Brr(i, j + 1)
      '¡ô¥Oj°j°éB°}¦C­È¬O i°j°é¦C²Äj°j°é+1ÄæBrr°}¦C­È
   Next
   Y(N) = B
   '¡ô¥ONÅܼƬ°key,item¬OBÅܼƯǤJY¦r¨å¸Ì
Next
[J1].Resize(N, UBound(A) + 1) = Application.Transpose(Application.Transpose(Y.Items))
'¡ô¥O[J1]ÂX®i¦V¤UNÅܼƦC,ÂX®i¦V¥kA°}¦C³Ì¤j¯Á¤Þ¸¹+1Äæ,
'³o½d³òÀx¦s®æ­È¥H Y¦r¨åªºitemÂà¸m¨â¦¸±a¤J

Erase Brr, B, A, Z: Set Y = Nothing
'¡ô¥OÄÀ©ñÅܼÆ
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD