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

¨Ì­q³æ¸ê®ÆÂà´«¦¨¤»¶g±Æµ{ªí¡A·q½Ð¦U¦ì¤j¤j½ç±Ð!!!

¦^´_ 16# p6703

§Ú²q·Q¬O§AªºSheet2!E2ªº¤é´Á¤ñ©Ò¦³­q³æ¤é´Áªº³Ì¤p­ÈÁÙ¤j¡A¤~·|²£¥Í³o¼Ëµ²ªG
½Ð¤W¶Ç¥X¿ùÀɮפ~¯àª¾¹D½T¹ê­ì¦]
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁÂHsieh¥Sªº¦^ÂÐ,¤p§Ì«ö³Ì·sµ{¦¡½X°õ¦æ«á,«o¶]¥X"°õ¦æ¶¥¬q¿ù»~'9'¡A°}¦C¯Á¤Þ¶W¥X½d³ò"¡A¨Ã°±¦bar(0, x) = ar(0, x) + A.Offset(, 3)¦¹µ{¦¡½X¡A¦]§Ú²{°õ¦æªºµ§¼Æ¦³§Ö200µ§¡A¬O¦³³]­­µ§¼Æ¶Ü???

ÁÙ¦³­ì´£¨Ñ³øªí¤¤¶È¦³"­q³æ"¡A"®Æ¸¹"¡A"¶µ¦¸"¤T¸ê®Æ¡A¦ý¦pªG­n¦A¼W¥[´Xµ§¸ê®Æ¡A­ìµ{¦¡½X¬O§_§Y»Ý¦A­×§ï???

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-5-2 22:35 ½s¿è

¦^´_ 14# p6703

¦pªG¥H2010ª©¥»¶}±ÒÀɮ׮ɡA¦]¬°¤u§@ªíªºcodename¬O"¤u§@ªí1"¡B"¤u§@ªí2"...µ¥¡A¨Ã«D"Sheet1"¡B"Sheet2"...µ¥
©Ò¥H¥X¿ù¡C
½ÐÀˬd¤u§@ªíªºCodeName¬O§_¦s¦b?

³Ì«áªºµo©«¤¤¤w¸g§ï¦¨¨Ï¥Î¤u§@ªíªºNameÄÝ©Ê¡A­Y¦³¿ù»~½ÐÀˬd¤u§@ªí¦WºÙ¡C

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥ý·PÁÂHsiehª©¥D¤F,©ú¤é¦A´ú¸Õ¬Ý¬Ý,¦ý¤W¤@­Ó°ÝÃD¤´·Q½Ð°Ý,´N¬O¦p³æ½Æ»s¥N½X,¦]¦ó°õ¦æ¥¨¶°·|¶]¥X¿ù»~©O...
Hsiehª©¥Dªº¥¨¶°,¤j¤j­°§C¤u§@¶q,¯uªº¤Ó·PÁ§A¤F

TOP

¦^´_ 12# p6703
  1. Sub Ex()
  2. Dim A As Range, x%, y%
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheets("Sheet2")
  5. s = Application.Min(.Rows(1))
  6. With Sheets("Sheet1")
  7. n = Application.Max(.Columns("E:F")) - s + 4
  8.    For Each A In .Range(.[A2], .[A2].End(xlDown))
  9. ReDim ar(0 To 1, 0 To n)
  10.        m = A & "," & A.Offset(, 1) & "," & A.Offset(, 2)
  11.        If IsEmpty(d(m)) Then
  12.        GoTo 10
  13.        Else
  14.        For i = 0 To 1
  15.          For j = 0 To n
  16.            ar(i, j) = d(m)(i, j)
  17.          Next
  18.        Next
  19.        End If
  20. 10
  21.        x = A.Offset(, 4) - s + 4 '»Ý¨D¤é
  22.        y = A.Offset(, 5) - s + 4 '¥æ´Á
  23.        For i = 0 To 2
  24.          ar(0, i) = A.Offset(, i)
  25.        Next
  26.        ar(0, 3) = "»Ý¨D¤é"
  27.        ar(1, 3) = "¥æ´Á"
  28.        ar(0, x) = ar(0, x) + A.Offset(, 3) '»Ý¨D
  29.        ar(1, y) = A.Offset(, 3)
  30.        d(m) = ar
  31.        Erase ar
  32.    Next
  33. End With
  34. r = 2
  35. For Each ky In d.keys
  36.   .Cells(r, 1).Resize(2, n + 1) = d(ky)
  37.   r = r + 2
  38. Next
  39. End With
  40. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ª©¥D¦]¤p§Ì¹ê»Ú±Æµ{¦³®É·|¦³¸ó¤ëªº°ÝÃD¡A¨Ò¡G»Ý¨D¤é5/20¡A¥æ´Á¦^ÂШì6/10¡A¦ý«ö¥Ø«e¥¨¶°°õ¦æµo²{¶È¤ñ¹ï"¤é"¦Ó¤w¡A¦p«ö¥H¤W¤é´Á¡A¨ä¥æ´Á¹ïÀ³ªº·|¨q¨ì5/10¡A¦¹¬O§_¥i¦A­×¥¿???

TOP

·PÁÂHsieh ª©¥D¡A¤p§Ì±N¥N½X½Æ»s­n°õ¦æ®É¡A¤S¦b"n = .Cells(1, .Columns.Count).End(xlToLeft).Column - 1¡¨¦¹¦C¶]¥X"°õ¦æ¶¥¬q¿ù»~ '424': ¦¹³B»Ý­nª«¥ó"ªºÄµ§iµøµ¡¡A¬O°£¤F½Æ»s¥~ÁÙ¦³»Ý­n¦A°µ¤°»òªº³]©w¶Ü???

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-4-28 00:11 ½s¿è

¦^´_ 4# p6703
  1. Sub Ex()
  2. Dim A As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5. n = .Cells(1, .Columns.Count).End(xlToLeft).Column - 1
  6. s = Day(.[E1])
  7. With Sheet1
  8.    For Each A In .Range(.[A2], .[A2].End(xlDown))
  9. ReDim ar(0 To 1, 0 To n)
  10.        m = A & "," & A.Offset(, 1) & "," & A.Offset(, 2)
  11.        If IsEmpty(d(m)) Then
  12.        GoTo 10
  13.        Else
  14.        For i = 0 To 1
  15.          For j = 0 To n
  16.            ar(i, j) = d(m)(i, j)
  17.          Next
  18.        Next
  19.        End If
  20. 10
  21.        x = Day(A.Offset(, 4)) - s + 4 '»Ý¨D¤é
  22.        y = Day(A.Offset(, 5)) - s + 4 '¥æ´Á
  23.        For i = 0 To 2
  24.          ar(0, i) = A.Offset(, i)
  25.        Next
  26.        ar(0, 3) = "»Ý¨D¤é"
  27.        ar(1, 3) = "¥æ´Á"
  28.        ar(0, x) = ar(0, x) + A.Offset(, 3) '»Ý¨D
  29.        ar(1, y) = A.Offset(, 3)
  30.        d(m) = ar
  31.        Erase ar
  32.    Next
  33. End With
  34. r = 2
  35. For Each ky In d.keys
  36.   .Cells(r, 1).Resize(2, n + 1) = d(ky)
  37.   r = r + 2
  38. Next
  39. End With
  40. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤p§Ì¥ýºN¯Á¬Ý¬Ý¤F.¦A¦¸·PÁÂregister313¥S^^

TOP

·PÁÂregister313¥S¡A¥i¥H°õ¦æ¤F¡A¦ý¤p§Ì¤£©ú¥Õ¡Aµ{¦¡½X¤@¼Ë¡A¦]¦ó¤p§Ì¦Û¤v½Æ»s¶K¤Wªº´N¤£¦æ©O???ÁÙ¦³¤p§Ì±µÄ²vba¤£¤[¡A¤£ª¾¬O§_¥i½Ðregister313¥S°w¹ïµ{¦¡½X¤p¤p»¡©ú¤@¤U¡AÁÂÁÂ...

TOP

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD