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

[µo°Ý] ¬°¤°»ò¨S¿ìªk°µ¨ì¨C¤­¤ÀÄÁ°Ê§@¤@¦¸??

[µo°Ý] ¬°¤°»ò¨S¿ìªk°µ¨ì¨C¤­¤ÀÄÁ°Ê§@¤@¦¸??

§Úªºsheet1¦³¤T¦CDDEªº¼Æ¾Ú
§Ú·Q§â³o¤T¦C¼Æ¾Ú¨C¤­¤ÀÄÁ¤À§O¬ö¿ý¤@¦¸¨ì¤T­Ó¤u§@ªísheet2~sheet4
°»¿ù³£¨S°ÝÃD
¥i¬O«o¶]¤@¦¸´N°±¤F
­Ë©³¬O¬Æ»ò­ì¦]©O
§Ú¦bsheet1¶Kªºµ{¦¡½X¦p¤U



Private Sub Worksheet_Calculate()

Dim NowDateTime, NowTime, StartTime, StopTime
    Dim tr As String

   
    NowDateTime = Now
    NowTime = NowDateTime - Int(NowDateTime)
    StartTime = Sheet2.[A2]
    StopTime = Sheet2.[A185]
   
    If NowTime <= StartTime Then
        Exit Sub
    ElseIf NowTime > StopTime Then
        Exit Sub
    End If
   
    tr = Int((NowTime - StartTime) * 288) + 2
   
   
   
    Sheet2.Range("B" & tr).Value = Sheet1.Range("A2").Value
    Sheet2.Range("C" & tr).Value = Sheet1.Range("B2").Value
    Sheet2.Range("D" & tr).Value = Sheet1.Range("C2").Value
    Sheet2.Range("E" & tr).Value = Sheet1.Range("D2").Value
    Sheet2.Range("F" & tr).Value = Sheet1.Range("E2").Value
    Sheet2.Range("G" & tr).Value = Sheet1.Range("F2").Value


    Sheet3.Range("B" & tr).Value = Sheet1.Range("A3").Value
    Sheet3.Range("C" & tr).Value = Sheet1.Range("B3").Value
    Sheet3.Range("D" & tr).Value = Sheet1.Range("C3").Value
    Sheet3.Range("E" & tr).Value = Sheet1.Range("D3").Value
    Sheet3.Range("F" & tr).Value = Sheet1.Range("E3").Value
    Sheet3.Range("G" & tr).Value = Sheet1.Range("F3").Value

    Sheet4.Range("B" & tr).Value = Sheet1.Range("A4").Value
    Sheet4.Range("C" & tr).Value = Sheet1.Range("B4").Value
    Sheet4.Range("D" & tr).Value = Sheet1.Range("C4").Value
    Sheet4.Range("E" & tr).Value = Sheet1.Range("D4").Value
    Sheet4.Range("F" & tr).Value = Sheet1.Range("E4").Value
    Sheet4.Range("G" & tr).Value = Sheet1.Range("F4").Value

End Sub

DJ.rar (21.79 KB)

µ{¦¡¤¤¨Ã¨S¦³¨C¤­¤ÀÄÁ¤À°õ¦æ¤@¦¸ªº±Ô­z

TOP

µ{¦¡¤¤¨Ã¨S¦³¨C¤­¤ÀÄÁ¤À°õ¦æ¤@¦¸ªº±Ô­z
oobird µoªí©ó 2011-6-22 15:45



    ·PÁ¦^À³

­ì¨Ó  tr = Int((NowTime - StartTime) * 288) + 2
³o¤@¦æ¨Ã¨S¦³¤­¤À´«¦æ¤@¦¸ªº®ÄªG
·Q½Ð°Ý¤@¤U­n¹F¨ì¤­¤ÀÄÁ°õ¦æ¤@¦¸ªº¸Ü
µ{¦¡½X¸Ó«ç»ò§ï©O
ÁÂÁ±z¤F

TOP

¯¸¤W¦³³\¦h³oÃþªº°Q½×¡A§ä¤@¤U§a¡CÀH¤âÀ°§A§ä¤F¤@­Ó¡G
http://forum.twbts.com/thread-2044-1-22.html

TOP

¦^´_ 3# enhrulee
§A¥i¥H°Ñ¦Ò³o½g :
http://blog.xuite.net/crdotlin/excel/9016607

TOP

¦^´_  enhrulee
§A¥i¥H°Ñ¦Ò³o½g :
http://blog.xuite.net/crdotlin/excel/9016607
luhpro µoªí©ó 2011-6-28 21:37



    ·PÁ±zªº¦^À³
§Ú·|¦h¦h¬ã¨s¤@¤Uªº

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-7 10:50 ½s¿è

¦^´_ 1# enhrulee
¨Ì¾Ú§AªºªþÀÉ©Ò¼g
  1. Sub AppOntime()
  2.     Dim E As Range
  3.     For Each E In Sheets("Sheet1").[A2:A184]
  4.         Application.OnTime E, "Ex "    '¤@¯ëModule ¤£¥²«ü©ú
  5.         '  ****  Application.OnTime E, "Sheet1.Ex "    'ª«¥óModule ªºµ{§Ç¶·«ü©ú ª«¥óModule
  6.     Next
  7. End Sub
  8. Private Sub Ex()   '¦¹µ{§Ç¬O¸m©ó¤@¯ëModule
  9.     Dim Rng As Range
  10.     Set Rng = Sheets("Sheet1").Columns(1).Find(Format(Time, "H:MM:00 AM/PM"))
  11.     Sheets("Sheet1").Cells(Rng.Row, 2).Resize(1, 6) = Sheets("Sheet4").Range("A2:F2").Value
  12.     Sheets("Sheet2").Cells(Rng.Row, 2).Resize(1, 6) = Sheets("Sheet4").Range("A3:F3").Value
  13.     Sheets("Sheet3").Cells(Rng.Row, 2).Resize(1, 6) = Sheets("Sheet4").Range("A4:F4").Value
  14. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD