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

¡y¤w¸Ñ¨M¡z°}¦C¤ñ¸û¡A§ä¥X®t²§ªºÀx¦s®æ

¡y¤w¸Ñ¨M¡z°}¦C¤ñ¸û¡A§ä¥X®t²§ªºÀx¦s®æ

¥»©«³Ì«á¥Ñ ko310kmo ©ó 2011-5-14 17:06 ½s¿è

test.rar (13.84 KB)
DDE¶Ç­Èªº¤è¦¡¥u¯àIJ°ÊCalculate¨Æ¥ó¡A¦ÓµLªkIJ°ÊChange¨Æ¥ó

sheet1ªº
BÄæ¬O¦U­Ó»ù¦ì
CÄæ¬O¦¨¥æ»ù
DÄæ¬O³æ¶q
C¡BDÄæ«ùÄò±µ¨üDDE¶Ç­È

¥»¨Ó¬O¥ÎCalculate¨Æ¥ó³B²z¡A¦ýµLªk§ä¥X¯u¥¿ÅܰʪºÀx¦s®æ¡A·|³y¦¨¸ê®Æ­«½Æªº¿ù»~


²{¦b§Ú·Q¨ìªº¿ìªk¬O¡G
²Ä¤@¦¸ÅÜ°Ê´N§âDÄæ¼g¤J²Ä¤@­Ó°}¦C
²Ä¤G¦¸ÅÜ°Ê´N§âÅܰʫ᪺DÄæ¼g¤J²Ä¤G­Ó°}¦C
¦A¤G­Ó°}¦C¤ñ¸û¡A¥H§ä¥X¬O­þ¤@­ÓÀx¦s®æ¦bÅÜ°Ê¡AÂǦ¹§ä¥X¨ä©ÒÄݪº»ù¦ì¡A¦A§â»ù¡B¶qÅܰʫ᪺¸ê®Æ¼g¤J¨ä»ù¦ì©ÒÄݪº¤u§@ªí

¦ý§Ú¹ï°}¦Cªº¼g§@¤è¦¡ÁÙ¤£¼ô±x¡A·j´M½×¾Â¤å³¹¡A¤]¨S¦³¬Û¦üªº½g´T¡A½Ð¦U¦ì¤j¤jÀ°¦£¡I¡I
©ÎªÌ¤j®a¦³§ó¦nªº¿ìªk¥i¥H§ä¥X¥D­nÅܰʪºÀx¦s®æªº¤èªkªº·Qªk¥i¥H´£¨Ñ°Ñ¦Ò¡A§Æ±æ¤j®aÀ°À°¦£¡AÁÂÁÂ!!
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¦^´_ 1# ko310kmo
´N¥Î§AªºÅÞ¿è
  1. Dim ar
  2. Private Sub Worksheet_Calculate()
  3. If IsEmpty(ar) Then ar = [B2:D13]: Exit Sub
  4. Set rng = [B2:D13]
  5. For I = 1 To UBound(ar, 1)
  6.     If ar(I, 2) & ar(I, 3) <> rng(I, 2) & rng(I, 3) Then
  7.        With Sheets(CStr(ar(I, 1)))
  8.           Set a = .[H65536].End(xlUp).Offset(1)
  9.           a = rng(I, 1): a.Offset(, 1) = rng(I, 2): a.Offset(, 3) = rng(I, 3)
  10.        End With
  11.     End If
  12. Next
  13. ar = rng
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# ko310kmo
  1. Dim A, B, TheTime As Date, AR, ¶}½L»ù
  2. Private Sub Worksheet_Calculate()
  3.     Dim E, i%
  4.     On Error GoTo t     '³B²z §Y®É¦¨¥æ»ù»P¦¨³æ¶q ½d³ò¨S¦³¿ù»~­È
  5.     If Not Range("C2", Range("D2").End(xlDown)).SpecialCells(xlCellTypeFormulas, xlErrors) Is Nothing Then
  6.         Exit Sub      '¦¹Àɮתì¶}©l³sµ²®É§Y±Ò°Ê­«ºâ ->¦ý¬O©|¦³¥¼³sµ²¨ìªºÀx¦s®æ·|¶Ç¦^¿ù»~­È
  7.     End If
  8. t:
  9.     A = Application.Transpose(Range("C2", Range("D2").End(xlDown)).Value)   '§Y®É¦¨¥æ»ù»P¦¨³æ¶q½d³ò°}¦C
  10.     If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then   '³]©w¨C¤ÀÄÁ¾ã
  11.         ReDim AR(2 To Range("b2").End(xlDown).Row, 1 To 6)
  12.         Ex
  13.         TheTime = TimeSerial(Hour(Time), Minute(Time), 0)
  14.     Else
  15.         Ex
  16.     End If
  17.     If IsEmpty(B) Then                      '¤ñ¹ï°}¦C¬°¸ê®Æ
  18.         For Each E In Range("b2", Range("b2").End(xlDown))
  19.             With Sheets(E.Text).Cells(Rows.Count, "j").End(xlUp)
  20.                 .Offset(1) = E(1, 2)        '°O¿ý¤U ¦¨¥æ»ù
  21.                 .Offset(1, 1) = E(1, 3)     '°O¿ý¤U ³æ¶q
  22.                 .Offset(1, 2).Resize(1, 6) = Application.Index(AR, E.Row - 1)  'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
  23.             End With
  24.         Next
  25.     Else
  26.         For i = 1 To UBound(A, 2)
  27.             If A(1, i) <> B(1, i) Or A(2, i) <> B(2, i) Then        ' ¼i¬ù»ùªº(¦¨¥æ»ù©Î¦¨³æ¶q)¦³ÅÜ°Ê
  28.                 With Sheets([B2].Cells(i, 1).Text).Cells(Rows.Count, "j").End(xlUp)
  29.                     .Offset(1) = [B2].Cells(i, 2)       '°O¿ý¤U §Y®É¦¨¥æ»ù
  30.                     .Offset(1, 1) = [B2].Cells(i, 3)    '°O¿ý¤U ³æ¶q
  31.                     .Offset(1, 2).Resize(1, 6) = Application.Index(AR, i)  'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
  32.                 End With
  33.             End If
  34.         Next
  35.     End If
  36.     B = A
  37. End Sub
½Æ»s¥N½X
  1. Sub Ex()   'Sheet1ªºµ{¦¡½X    §Aµo°Ýªº¨º½g [dde tick¸ê®ÆÂà´«¤ÀÄÁ¸ê®Æ]
  2.     '½Ð°Ý¦¬½L»ù¬O¦ó®Éªº»ù®æ
  3.     Dim i%
  4.     For i = 2 To [B1].End(xlDown).Row
  5.         If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then
  6.             AR(i, 1) = TimeSerial(Hour(Time), Minute(Time), 0)  '¨C¤ÀÄÁ®É¶¡
  7.             If IsEmpty(B) Then
  8.                 If IsEmpty(¶}½L»ù) Then ReDim ¶}½L»ù(2 To UBound(AR))
  9.                 ¶}½L»ù(i) = Cells(i, "C")       '¶}½L»ù
  10.             End If
  11.             AR(i, 2) = ¶}½L»ù(i)
  12.             AR(i, 3) = Cells(i, "C")  '¨C¤ÀÄÁªº³Ì°ª»ù
  13.             AR(i, 4) = Cells(i, "C")  '¨C¤ÀÄÁªº³Ì§C»ù
  14.            ' AR(i, 5) = Cells(i, "C")  '½Ð°Ý¦¬½L»ù¬O¦ó®Éªº»ù®æ
  15.             AR(i, 6) = Cells(i, "D")  '¨C¤ÀÄÁªº¦¨¥æ¶q
  16.         Else
  17.             AR(i, 3) = IIf(Cells(i, "C") > AR(i, 3), Cells(i, "C"), AR(i, 3)) '¨C¤ÀÄÁªº³Ì°ª»ù
  18.             AR(i, 4) = IIf(Cells(i, "C") < AR(i, 4), Cells(i, "C"), AR(i, 4)) '¨C¤ÀÄÁªº³Ì§C»ù
  19.            ' AR(i, 5) = Cells(i, "C")                                          '¨C¤ÀÄÁªº¦¬½L»ù
  20.             AR(i, 6) = AR(i, 6) + Cells(i, "D")                              '¨C¤ÀÄÁªº¦¨¥æ¶q
  21.         End If
  22.     Next
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# Hsieh
ÁÂÁ¤j¤jªº¸Ñ´b¡A¦³´X­Ó°ÝÃD·Q½Ð±Ð¡A

Dim ar
Private Sub Worksheet_Calculate()
If IsEmpty(ar) Then ar = [B2:D13]: Exit Sub
¦pªG¬OªÅ­Èar = [B2:D13]¡A§_«h´Nµ²§ôsubªº·N«ä¶Ü?

Set rng = [B2:D13]¡@¡@¡@¡@¬O³]¦¨°}¦Cªº·N«ä¶Ü? rng¬Orangeªº·N«ä¶Ü? ÁÙ¬O¬O¥N¸¹¦Ó¤w?]

For I = 1 To UBound(ar, 1)
    If ar(I, 2) & ar(I, 3) <> rng(I, 2) & rng(I, 3) Then
   ¬°¤°»ò·|ª¾¹Dar¡Brng¬OÅÜ°Ê«e«áªº°}¦C?

       With Sheets(CStr(ar(I, 1)))
          Set a = .[H65536].End(xlUp).Offset(1)
©ÒÄݤu§@ªíªºhÄæ³Ì«á¤@µ§¦³¸ê®ÆªºÄæ¦ìªº¤U¤@¦C¡C ¬O³o·N«ä¹ï§a!!   ¦ý¥¦ªº¤U¤@¦æ¤£¬OªÅ¥Õ¶Ü?

          a = rng(I, 1): a.Offset(, 1) = rng(I, 2): a.Offset(, 3) = rng(I, 3)
       End With
    End If
Next
ar = rng   
End Sub  

¬õ¦rªº³¡¤À¬O§ÚÁÙ¤£¤Ó©ú¥Õªº·N«ä¡A§Æ±æ¤j¤j¯à¬°§Ú¸Ñ´b¤@¤U¡AÁÂÁ§A¡B³Â·Ð§A¤F!!!
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 3# GBKEE

¦¬½L»ù¡A¬O³o¤@¤ÀÄÁ¤º¡A³Ì«á±µ¦¬ªº¤@­Ó¸ê®Æ!!
ex:   08:45:00~08:45:59

¤j¤j
²Ä¤G­Óµ{¦¡­n©ñ¦bsheet1¶Ü?
¤£¬O©ñ¦bthisworkbook©ÎªÌ¤@¯ë¼Ò²Õ¶Ü?

§Ú¤§«e§â¥¦¸òCalculate¨Æ¥ó³£©ñ¦bsheet1¡A
³o­Óµ{¦¡´N·|¶]¤£¥X¥¿±`­È¡A¸ê®Æ·|¶Ã¸õªº°ÝÃD¡C

ÁÂÁ¤j¤jªº¼ö¤ß¦^µª
³o¨âµ{¦¡§Ú¦A¦Û¤w¦n¦n¬ã¨s¤@¤U¡A¦³°ÝÃD¦A½Ð±Ð¤j¤j¡A
ÁÂÁ¤j¤jªºÀ°¦£¡I¡I¡I
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 5# ko310kmo
¥þ³¡¸m©óSheet1
Calculate¨Æ¥ó ¬O¤u§@ªíªº¹w³]¨Æ¥ó
³o­ÓExµ{§Ç ¬O¨Ì©ñ¦bSheet1ª«¥óªº¼Ò²Õ©Ò¼gªº

TOP

¦^´_ 4# ko310kmo
Dim ar  '«Å§i¤@­ÓÀRºA°}¦CÅܼÆ
Private Sub Worksheet_Calculate()
If IsEmpty(ar) Then ar = [B2:D13]: Exit Sub
¦pªG¬OªÅ­Èar = [B2:D13]¡A§_«h´Nµ²§ôsubªº·N«ä¶Ü?  '¦pªG³o­ÓÀRºA°}¦CÁÙ¨S«Ø¥ß¡Aªí¥Ü¶}±ÒÀɮ׫á²Ä¤@¦¸­«ºâ®É¡A©Ò¥H¤£¥²°µ¥ô¦ó¤ñ¸û´N°h¥Xµ{§Ç

Set rng = [B2:D13]¡@¡@¡@¡@¬O³]¦¨°}¦Cªº·N«ä¶Ü? rng¬Orangeªº·N«ä¶Ü? ÁÙ¬O¬O¥N¸¹¦Ó¤w?]  '³o­ÓrngÅܼƬO­ÓRange«¬ºAªºÅܼơA´N¬O«ü¦V§ADDE¤½¦¡©Ò¦bªº½d³ò

For I = 1 To UBound(ar, 1)   '·íÀRºA°}¦C¦³³Q¼g¤J¤¸¯Àªº­È¤~·|¶i¨ì¦¹´`Àô
    If ar(I, 2) & ar(I, 3) <> rng(I, 2) & rng(I, 3) Then  '¤ñ¸û°}¦C¸ò½d³òªº­È¬O§_¤@¼Ë
   ¬°¤°»ò·|ª¾¹Dar¡Brng¬OÅÜ°Ê«e«áªº°}¦C?
¦]¬°ar¬Oµ{§Ç³Ì«á§ârngªº­È¤Ï¹L¨Ó³]µ¹ar¡A©Ò¥Har´NÅܦ¨«e¤@¦¸rngªº­È
       With Sheets(CStr(ar(I, 1)))
          Set a = .[H65536].End(xlUp).Offset(1)
©ÒÄݤu§@ªíªºhÄæ³Ì«á¤@µ§¦³¸ê®ÆªºÄæ¦ìªº¤U¤@¦C¡C ¬O³o·N«ä¹ï§a!!   ¦ý¥¦ªº¤U¤@¦æ¤£¬OªÅ¥Õ¶Ü?
'¬O¸ê®Æ§Àªº¤U¤@¦CªÅ¥Õ¨S¿ù¡A§A¤£¬O­n§â³o¨Ç¬ö¿ý¼g¨ì¹ïÀ³ªº¤u§@ªí¤º¶Ü?

          a = rng(I, 1): a.Offset(, 1) = rng(I, 2): a.Offset(, 3) = rng(I, 3)
       End With
    End If
Next
ar = rng   '±Nrngªº­È³]µ¹ar ¡A°µ¤U¤@¦¸­«ºâªº¤ñ¹ï°ò¦
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# Hsieh


ÁÂÁ¤j¤j¸Ô²Ó¡B­@¤ßªº¸ÑÄÀ
§Ú³£¤j·§¤F¸Ñ¤F
§Ú·|¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ¤j¤jªºÀ°¦£¡I¡I¡I¡I
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ ko310kmo ©ó 2011-5-12 02:09 ½s¿è

¦^´_ 6# GBKEE
ÁÂÁ¤j¤jªº¼ö¤ßÀ°§U¡A·Q¥ý½Ð±Ð´X­Ó°ÝÃD


A = Application.Transpose(Range("C2", Range("D2").End(xlDown)).Value)   '§Y®É¦¨¥æ»ù»P¦¨³æ¶q½d³ò°}¦C
    If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then   '³]©w¨C¤ÀÄÁ¾ã
        ReDim AR(2 To Range("b2").End(xlDown).Row, 1 To 6)
        Ex
        TheTime = TimeSerial(Hour(Time), Minute(Time), 0)
    Else
        Ex
    End If
¡@¤£¤ÓÀ´ªº³o¬qªº·N«ä
    If IsEmpty(B) Then                      '¤ñ¹ï°}¦C¬°¸ê®Æ
        For Each E In Range("b2", Range("b2").End(xlDown))
            With Sheets(E.Text).Cells(Rows.Count, "j").End(xlUp)
                .Offset(1) = E(1, 2)        '°O¿ý¤U ¦¨¥æ»ù
                .Offset(1, 1) = E(1, 3)     '°O¿ý¤U ³æ¶q
                .Offset(1, 3).Resize(1, 6) = Application.Index(AR, E.Row - 1)  'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
¡@¡@¡@¡@¡@¡@¡@¬°¤°»ò­nŪ¨ú¤@¤ÀÄÁªº¸ê®Æ¡H
            End With
        Next
    Else
        For i = 1 To UBound(A, 2)
            If A(1, i) <> B(1, i) Or A(2, i) <> B(2, i) Then        ' ¼i¬ù»ùªº(¦¨¥æ»ù©Î¦¨³æ¶q)¦³ÅÜ°Ê
                With Sheets([B2].Cells(i, 1).Text).Cells(Rows.Count, "j").End(xlUp)
½Ð°Ý[B2]¬O¤°»ò·N«ä¡A¥»¨Ó¥H¬°¬ORange("B2")¡A¦ý·Pı¦n¹³¦³¤£¹ï¡D¡D¡D

                    .Offset(1) = [B2].Cells(i, 2)       '°O¿ý¤U §Y®É¦¨¥æ»ù
                    .Offset(1, 1) = [B2].Cells(i, 3)    '°O¿ý¤U ³æ¶q
                    .Offset(1, 2).Resize(1, 6) = Application.Index(AR, i)  'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ

-------------------------------------------------------------------------------------

§Ú·Ó¤j¤jªºÀÉ¡A¦A¨Ì§Ú­Ó¤H»Ý¨D¡A¦A°µ¤F¤Ö³¡¤Àªº­×§ï
»¡©ú¤@¤U§Ú¥D­nªº¬[ºc
sheet1±µ¨üDDEªº­È
¬Y¤@¦Cªº¦¨¥æ»ù¤@ÅÜ°Ê¡A´N°¨¤W§â¥¦ªº»ù¡B¶q¡BÅܰʪº®É¶¡¡]²Ä´X¤À´X¬íµo¥Í¸õ°Êªº®É¶¡¡^
°O¤J¨ì¥¦©ÒÄݪº¤u§@ªí¡A¤@ª½©¹¤U¬ö¿ý¡]¢Ø¡ã¢ÚÄæ¡^¡]¬íªº¸ê®Æ¡^
¨Ã¨C¨ì¤@¤ÀÄÁ´N§âºâ¥X¥¦¤@¤ÀÄÁ¤ºªº¶}¡B°ª¡B§C¡B¦¬¡B¦¨¥æ¶q¡]¢Û¡ã¢àÄæ¡^ over 5.12.rar (24.11 KB)
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-5-12 10:52 ½s¿è

¦^´_ 9# ko310kmo
If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then
Àɮפ@°õ¦æ®É TheTime <> TimeSerial(Hour(Time), Minute(Time), 0)
°õ¦æ¤§«á¦³³]©w TheTime = TimeSerial(Hour(Time), Minute(Time), 0)
¸g®É¶¡¨ì¤U¤@¤ÀÄÁ«á TheTime <> TimeSerial(Hour(Time), Minute(Time), 0)
ReDim AR(2 To Range("b2").End(xlDown).Row, 1 To 6)
±N AR°}¦C ­«·sªì©l¤Æ  (Âk¹s)
.Offset(1, 3).Resize(1, 6) = Application.Index(AR, E.Row - 1)  'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
AR°}¦C¬O¬ö¿ý¤@¤ÀÄÁ¤º¦U¼i¬ù»ùªº ®É¶¡, ¶}, °ª, §C, ¦¬, ¶q
½Ð°Ý[B2]¬O¤°»ò·N«ä
http://forum.twbts.com/viewthread.php?tid=2811&from=favorites
*******************************************************
­«·s­×§ï¸Õ¸Õ¬Ý ¦ý»P§Aªº´Á±æ©|¦³¶ZÂ÷
  1. Private Sub Worksheet_Calculate()
  2. Dim E, i%
  3. On Error GoTo t '³B²z §Y®É¦¨¥æ»ù»P¦¨³æ¶q ½d³ò¨S¦³¿ù»~­È
  4. If Not Range("C2", Range("D2").End(xlDown)).SpecialCells(xlCellTypeFormulas, xlErrors) Is Nothing Then
  5. Exit Sub '¦¹Àɮתì¶}©l³sµ²®É§Y±Ò°Ê­«ºâ ->¦ý¬O©|¦³¥¼³sµ²¨ìªºÀx¦s®æ·|¶Ç¦^¿ù»~­È
  6. End If
  7. t:
  8. A = Application.Transpose(Range("C2", Range("D2").End(xlDown)).Value) '§Y®É¦¨¥æ»ù»P¦¨³æ¶q½d³ò°}¦C
  9. If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then '³]©w¨C¤ÀÄÁ¾ã
  10. ReDim AR(2 To Range("b2").End(xlDown).Row, 1 To 6) '°}¦C ­«·sªì©l¤Æ (Âk¹s)
  11. ¶}½L»ù = Empty 'Åܼƪì©l¤Æ (Âk¹s)
  12. Ex
  13. If Not IsEmpty(B) Then
  14. For Each E In Range("b2", Range("b2").End(xlDown))
  15. Sheets(E.Text).Cells(Rows.Count, "j").End(xlUp).Offset(, 6) = B(1, E.Row - 1) '¤@¤ÀÄÁµ²§ô®Éªº»ù®æ
  16. Next
  17. End If
  18. TheTime = TimeSerial(Hour(Time), Minute(Time), 0)
  19. Else
  20. Ex
  21. End If
  22. If IsEmpty(B) Then '¤ñ¹ï°}¦C¬°¸ê®Æ
  23. For Each E In Range("b2", Range("b2").End(xlDown))
  24. With Sheets(E.Text).Cells(Rows.Count, "j").End(xlUp)
  25. .Offset(1) = E(1, 2) '°O¿ý¤U ¦¨¥æ»ù
  26. .Offset(1, 1) = E(1, 3) '°O¿ý¤U ³æ¶q
  27. .Offset(1, 2).Resize(1, 6) = Application.Index(AR, E.Row - 1) 'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
  28. End With
  29. Next
  30. Else
  31. For i = 1 To UBound(A, 2)
  32. If A(1, i) <> B(1, i) Or A(2, i) <> B(2, i) Then ' ¼i¬ù»ùªº(¦¨¥æ»ù©Î¦¨³æ¶q)¦³ÅÜ°Ê
  33. With Sheets([B2].Cells(i, 1).Text).Cells(Rows.Count, "j").End(xlUp)
  34. .Offset(1) = [B2].Cells(i, 2) '°O¿ý¤U §Y®É¦¨¥æ»ù
  35. .Offset(1, 1) = [B2].Cells(i, 3) '°O¿ý¤U ³æ¶q
  36. .Offset(1, 2).Resize(1, 6) = Application.Index(AR, i) 'Ū¨ú¤@¤ÀÄÁ¤ºªº¸ê®Æ
  37. End With
  38. End If
  39. Next
  40. End If
  41. B = A
  42. End Sub
  43. Sub Ex() 'Sheet1ªºµ{¦¡½X §Aµo°Ýªº¨º½g [dde tick¸ê®ÆÂà´«¤ÀÄÁ¸ê®Æ]
  44. Dim i%
  45. If IsEmpty(¶}½L»ù) Then
  46. ReDim ¶}½L»ù(2 To UBound(AR))
  47. For i = 2 To [B1].End(xlDown).Row
  48. ¶}½L»ù(i) = Cells(i, "C")
  49. Next
  50. End If
  51. For i = 2 To [B1].End(xlDown).Row
  52. If TheTime <> TimeSerial(Hour(Time), Minute(Time), 0) Then
  53. AR(i, 1) = Time 'TimeSerial(Hour(Time), Minute(Time), 0) '®É¶¡
  54. AR(i, 2) = ¶}½L»ù(i) '¨C¤ÀÄÁ¶}½L»ù
  55. AR(i, 3) = Cells(i, "C") '¨C¤ÀÄÁªº³Ì°ª»ù
  56. AR(i, 4) = Cells(i, "C") '¨C¤ÀÄÁªº³Ì§C»ù
  57. AR(i, 6) = Cells(i, "D") '¨C¤ÀÄÁªº¦¨¥æ¶q
  58. Else
  59. AR(i, 1) = Time
  60. AR(i, 3) = IIf(Cells(i, "C") > AR(i, 3), Cells(i, "C"), AR(i, 3)) '¨C¤ÀÄÁªº³Ì°ª»ù
  61. AR(i, 4) = IIf(Cells(i, "C") < AR(i, 4), Cells(i, "C"), AR(i, 4)) '¨C¤ÀÄÁªº³Ì§C»ù
  62. 'AR(i, 5) = Cells(i, "C") '¨C¤ÀÄÁªº¦¬½L»ù
  63. AR(i, 6) = AR(i, 6) + Cells(i, "D") '¨C¤ÀÄÁªº¦¨¥æ¶q
  64. End If
  65. Next
  66. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD