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

³oºØ¨Ì®É¶¡¹Bºâªº¥¨¶°­n¦p¦ó¼g??

³oºØ¨Ì®É¶¡¹Bºâªº¥¨¶°­n¦p¦ó¼g??

½Ð°Ýª©¤W¤j¤j¡A¦pªG§Ú­n¼g¤@­Ó¥¨¶°¥\¯à¦p¤U¡A­n¦p¦ó¼g
A1=5
B1=3
C1=4

A2=7
B2=6
C2=9

¦pªG§Ú­n¦b8:46¤À°õ¦æ¹BºâE1=SUM(A1:C1)¡A8:47¤À°õ¦æE2=SUM(A2:C2)¡A¨Ì¦¹Ãþ±À¤@ª½°õ¦æ¨ì13:45¤À¡A¥B°õ¦æ§¹«áª½±µ¼g¤J­È¡A¦Ó¤£¬O¤½¦¡¡A½Ð°Ýª©¤W¤j¤j³o­Ó¥¨¶°­n¦p¦ó¼g©O??

P.S §Ú¤§«e¦³¸Õ¹Lª½±µ±N¤½¦¡¼g¦bÀx¦s®æ¡A¦ýµo²{¸ê®Æ¶q¤jªº¸Ü·|©ìºC°õ¦æ¼Æ«×¡A©Ò¥H·Q¸òª©¤W¤j¤j½Ð±Ð¤@¤U¥Î¥¨¶°­n¦p¦ó¼g
¤W­±ªº¥Ü½d¨Ò¡A§Ú¹ê»Ú°õ¦æªº¸ê®Æ¶q¤ñ¸û¤j

¥»©«³Ì«á¥Ñ PKKO ©ó 2014-11-16 01:36 ½s¿è

¦^´_ 1# ÂŤÑÄR¦À

¸Õ¸Õ¬Ý
  1. Public i As interger
  2. Sub test1()
  3.     i = 1
  4.     Application.OnTime TimeValue("08:46:00"), "test2" '¯S©w®É¶¡©I¥sµ{¦¡
  5. End Sub
  6. Sub test2()
  7.     Range("e" & i) = Application.WorksheetFunction.Sum(Range("A" & i & ":" & "C" & i + 2)) '¿é¤J­È
  8.    
  9.     If Hour(Time) = 13 Then '§PÂ_¤p®É
  10.         If Minute(Time) = 45 Then '§PÂ_¤À
  11.             MsgBox "µ²§ô" '¬Û¦P®É¤À«h¤£¦A¶i¦æ
  12.         Else
  13.             Application.OnTime Now + TimeValue("00:01:00"), "test2" '¤@¤ÀÄÁ«á¹B¦æ
  14.         End If
  15.     Else
  16.         Application.OnTime Now + TimeValue("00:01:00"), "test2" '¤@¤ÀÄÁ«á¹B¦æ
  17.     End If
  18.     i = i + 1
  19. End Sub
½Æ»s¥N½X
PKKO

TOP

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2014-11-16 10:29 ½s¿è

§ï.rar (101.96 KB) ¦^´_ 2# PKKO

½Ð°Ý¤j¤j¡A·|¥X²{¨Ï¥ÎªÌ«¬ºA©|¥¼©w¸q¬O¤°»ò·N«ä
¥t¥~¡A¦pªG§Ú­n§âRange("e" & i) = Application.WorksheetFunction.Sum(Range("A" & i & ":" & "C" & i + 2))¸Ì­±ªºSUM¨ç¼Æ§ï¦¨=IF(ISERROR(MATCH(U2,P:P,0)),"",MATCH(U2,P:P,0))¡A¨º½Ð°Ý¤@¤U¥¨¶°­n«ç»ò§ï??

¬O§ï¦¨Range("e" & i) = Application.WorksheetFunction.IF(ISERROR(MATCH(Range("U" & i +1& "," & "P" &":" & "P" & "," & "0"),"",MATCH(Range("U" & i +1& "," & "P" &":" & "P" & "," & "0"))§ï¦¨³o¼Ë¹ï¶Ü??

½Ð°Ý¤j¤jRange("A" & i & ":" & "C" & i + 2)¸Ì­±ªº½d³ò³¡¤À¡A°£¤F¥Î&ªºªº¤è¦¡¦³¨S¦³¨ä¥L¼gªk¡A¦]¬°¤½¦¡¦pªG«Ü¦hªº¸Ü·|&¤£§¹

©êºp¤j¤j°ÝÃD¦³ÂI¦h¡A¤£¹LÁÙ¬OÁÂÁ§Aªº¦^ÂÐ

¤j¤j§Ú¦³ªþ¤W§ÚªºÀɮסA¨ä¹ê§Ú­n­×§ïªº¬OT¡BW¡BXÄ檺³¡¤À¡A¦]¬°ª½±µ¼g¦bÀx¦s®æ¤W­±·|³y¦¨¹BºâÅܺC¡A©Ò¥H§Ú¤~·|·Q¥Î¥¨¶°ªº¤è¦¡¸Õ¸Õ¬Ý¡A¦pªG¤j¤j¯àª½±µÀ°§Ú­×§ï´N¯uªº¬O·P¿E¤£ºÉ¡A¦pªG¤£¯à¡AÁÙ¦|½Ð¤j¤jÀ°§Ú¸Ñµª¤@¤U¤W­±ªº°ÝÃD¡A·PÁÂ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-11-16 15:43 ½s¿è

¦^´_ 3# ÂŤÑÄR¦À

¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Dim i As Integer '(µu¾ã¼Æ)¸ê®Æ«¬ºA
  3. 'Public i As interger => ¥X²{¨Ï¥ÎªÌ«¬ºA©|¥¼©w¸q, ¥¿½T: Integer
  4. Sub Ex()
  5.     Dim xTime As Date
  6.     If Time >= #8:46:00 AM# And Time <= #1:45:00 PM# Then
  7.         With Sheets("RTD").Cells(i + 2, "T")
  8.                     'TÄ椽¦¡=IF(ISERROR(MATCH(U2,P:P,0)),"",MATCH(U2,P:P,0))
  9.             .Range("A1") = "=IF(ISERROR(MATCH(RC[1],P:P,0)),"""",MATCH(RC[1],P:P,0))"
  10.                     'UÄæ
  11.             .Range("B1") = IIf(Minute(Time) Mod 2 = 0, Application.Sum(Range("A1:C1")), Application.Sum(Range("A2:C2")))
  12.                     'VÄæ
  13.             .Range("C1") = Time
  14.                     'WÄ椽¦¡=IF(ISERROR(INDIRECT("O"&T2)),"",INDIRECT("O"&T2))
  15.             .Range("D1") = "=IF(ISERROR(INDIRECT(""O""&RC[-3])),"""",INDIRECT(""O""&RC[-3]))"
  16.                     'XÄ椽¦¡=IF(W2="","",IF(W2>54,-1,IF(W2<6,1,"")))
  17.             .Range("E1") = "=IF(RC[-1]="""","""",IF(RC[-1]>54,-1,IF(RC[-1]<6,1,"""")))"
  18.                     'YÄ椽¦¡=IF(ISERROR(INDIRECT("R"&T2)),Y1,INDIRECT("R"&T2))
  19.             .Range("F1") = "=IF(ISERROR(INDIRECT(""R""&RC[-5])),R[-1]C,INDIRECT(""R""&RC[-5]))"
  20.             .Resize(, 6) = .Resize(, 6).Value  '±N¤½¦¡¦^¼Æ­È
  21.         End With
  22.         i = i + 1
  23.         xTime = Time + #12:01:00 AM#
  24.         If xTime <= #1:45:00 PM# Then Application.OnTime xTime, "EX"
  25.     ElseIf Time < #8:46:00 AM# Then
  26.         Application.OnTime #8:46:00 AM#, "EX"
  27.     Else
  28.         MsgBox "®É¶¡¤w¹L"
  29.     End If
  30. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

G¤jÁÂÁ§Aªº¦^ÂСA¯uªº«Ü·PÁ§A¡Aµ¥µ¥¨Ó¸Õ¸Õ¬Ý¡AÁÂÁÂ

TOP

¦^´_ 4# GBKEE


    G¤j´ú¸Õ¹L«á¥u¦³UÄæ©MVÄ榳¼Æ¦r¨ä¥L³£Åã¥ÜªÅ¥Õ

TOP

¦^´_ 4# GBKEE


    G¤j¡A­è­è¤W­zªº³¡¤À§Ú¤w¸g­×§ï§¹¦¨¤F¡A¥Ø«e°õ¦æ¤W¬OOKªº¡A¤£¹L¸òG¤j»¡¤@Án©êºp¡A¦]¬°§Ú¶]§¹«áµo²{³o¤£¬O§Ú­nªºµ²ªG¡A·Q¦b½Ð±Ð¤@¤UG¤j¡A¦pªG§Ú­n§â¤§«eªº¨º­Óµ{¦¡§ï¦¨¨ç¼ÆÁÙ¬O¦bÀx¦s®æ¤W­±¡A¦ý·í¨C¤ÀÄÁ°õ¦æ§¹«á±µ­È¼g¦bÀx¦s®æ¤º(¥D­n¬O­n¬Ý¨C¬íÄÁªºÅܤơA¦ý¬Oµ{¦¡°õ¦æ«áÅܦ¨¨C¤ÀÄÁ¨ìªº®É­Ô¤~¬Ýªº¨ì¼Æ­È)¡A¦Ó¬O¤£¤½¦¡¡A½Ð°Ý¤@¤UG¤j³o¼Ë­n«ç»ò§ï??

TOP

¦^´_ 4# GBKEE

G¤j­è­èªº¦^ÂЦ³ÂI¶Ã¡A¥H¤U¤~¬O¯u¹êª©¥»(©êºpÅ޿観ÂI¶Ã±¼¤~·|³o¼Ë)

    G¤j¡A­è­è¤W­zªº³¡¤À§Ú¤w¸g­×§ï§¹¦¨¤F¡A¥Ø«e°õ¦æ¤W¬OOKªº¡A¤£¹L¸òG¤j»¡¤@Án©êºp¡A¦]¬°§Ú¶]§¹«áµo²{³o¤£¬O§Ú­nªºµ²ªG

·Q¦b½Ð±Ð¤@¤UG¤j¡A¦pªG§Ú­n§â¤§«eªº¨º­Óµ{¦¡§ï¦¨¨ç¼Æ¥X²{¦b«á¤@¤ÀÄÁªºÀx¦s®æ¡Aµ¥¨ì®É¶¡¨ì¦b¼g¦¨­È(¥D­n¬O­n¬Ý¨C¬íÄÁªºÅܤơA¦ý¬O¤§«eªºµ{¦¡°õ¦æ«áÅܦ¨¨C¤ÀÄÁ¨ìªº®É­Ô¤~¬Ýªº¨ì¼Æ­È)¡A¨Ò¦p8:45¤Àªº®É­Ô±N¤½¦¡¼g¦b8:46¤À¬Û¹ïÀ³ªºÀx¦s®æ¡AµM«á8:46¤À¨ìªº®É­Ô¦A±N¤½¦¡¼g¦¨­È¡A½Ð°Ý¤@¤UG¤j³o¼Ë­n«ç»ò§ï??

TOP

¦^´_ 8# ÂŤÑÄR¦À

¬O³o¼Ë¶Ü?
  1. With Sheets("RTD").Cells(i + 2, "T").Resize(, 7)
  2.             .Offset(-1).Value = .Offset(-1).Value '¤W¤@¦C:±N¤½¦¡¦^¼Æ­È
  3.             
  4.                     'TÄ椽¦¡=IF(ISERROR(MATCH(U2,P:P,0)),"",MATCH(U2,P:P,0))
  5.             .Range("A1") = "=IF(ISERROR(MATCH(RC[1],P:P,0)),"""",MATCH(RC[1],P:P,0))"
  6.                     'UÄæ
  7.             .Range("B1") = IIf(Minute(Time) Mod 2 = 0, Application.Sum(Range("A1:C1")), Application.Sum(Range("A2:C2")))
  8.                     'VÄæ
  9.             .Range("C1") = Time
  10.                     'WÄ椽¦¡=IF(ISERROR(INDIRECT("O"&T2)),"",INDIRECT("O"&T2))
  11.             .Range("D1") = "=IF(ISERROR(INDIRECT(""O""&RC[-3])),"""",INDIRECT(""O""&RC[-3]))"
  12.                     'XÄ椽¦¡=IF(W2="","",IF(W2>54,-1,IF(W2<6,1,"")))
  13.             .Range("E1") = "=IF(RC[-1]="""","""",IF(RC[-1]>54,-1,IF(RC[-1]<6,1,"""")))"
  14.                     'YÄ椽¦¡=IF(ISERROR(INDIRECT("R"&T2)),Y1,INDIRECT("R"&T2))
  15.             .Range("F1") = "=IF(ISERROR(INDIRECT(""R""&RC[-5])),R[-1]C,INDIRECT(""R""&RC[-5]))"
  16.                     'ZÄ椽¦¡=IF(ISERROR(Y2-Y1),"",Y2-Y1)
  17.             .Range("G1") = "=IF(ISERROR(RC[-1]-R[-1]C[-1]),"""",RC[-1]-R[-1]C[-1])"
  18.            
  19.         End With
  20.         
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 9# GBKEE

G¤j¯uªº«ÜÁÂÁ§A¡A³o¼ËOK¤F

TOP

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