¼ÐÃD:
´Æ¤âªºexcel¹Bºâ°ÝÃD¡A¦p¦ó§ïµ½??
[¥´¦L¥»¶]
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-26 14:15
¼ÐÃD:
´Æ¤âªºexcel¹Bºâ°ÝÃD¡A¦p¦ó§ïµ½??
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-26 14:18 ½s¿è
[attach]23180[/attach]
[attach]23181[/attach]
ªþÀɬO¤@Ó¤p§Ì¥±`¥Î¦b¬ö¿ýªºexcel¥Ø«e¦³¨Ç´Æ¤âªº¹Bºâ°ÝÃDÁٳ·Ъ©¤W¤j¤jÀ°§Ú¤@¤U
¦p¹Ï©Ò¥Ü¡A¥ªÃä¬O§Ú¥®É¦b¬ö¿ýªºÀx¦s®æ¡A¥kÃä¬Opºâ¥ÎªºÀx¦s®æ¡A¦ý¬O¦]¬°¥kÃäpºâªºÀx¦s®æ¸Ì±§Ú¦³¼g¤@¨Ç¨ç¼Æ¡A³y¦¨¾ãÓexcel¦b¶]ªº®ÉÔ¥ªÃäµLªk¬ö¿ý©Î¬O¾ãÓ·í±¼(¦]¬°©Ò¼g¨ç¼Æ¤Ó¦YCPU©M°O¾ÐÅé)¡A½Ð°Ý¤@¤Uª©¤W¤j¤j¤pªº³oÓ°ÝÃDÀ³¸Ó«ç»ò¸Ñ¨M¤~¦n??
§Ú¦³·Q¥X¤@¨Ç¸Ñ¨M¤è¦¡¡AµL©`¹ïVBA¤£¬O¤Ó¼ô¡A¦b·Ð½Ðª©¤W°ª¤âÀ°À°¦£
¸Ñ¨M¤è¦¡
1.Åý¥ªÃäA-F¦C§Y®É¹Bºâ(A2-F2¬ODDE©Ò¥H»ÝnÀH®É§ó·s¤~¯à±µ¦¬¸ê®Æ)¡AR-T¦C¨C¤ÀÄÁ¹Bºâ¤@¦¸¡A§ó·s§¹«á¼g¦¨È¦Ó¤£¬O¤½¦¡¡A³o¼Ëªº¤è¦¡¥i¥H¶Ü??(¤£ª¾¹D¦P¤@Ósheet¥i¤£¥i¥H¤£¦PÀW²v§Y®É¹Bºâ)
2.ÅܧóR-T¦Cªº¨ç¼Æ¼gªk¡AÅý¾ãÓµ{¦¡¶]°_¨Ó¤£n¨º»ò¦Y¸ê·½
3.±NS-T¦Cªº¨ç¼Æ¼g¦bVBA¸Ì±¡A¨C¤ÀÄÁ°õ¦æ¤@¦¸°õ¦æ§¹«á±N¤½¦¡¼g¦¨È
·Ð½Ðª©¤Wªº°ª¤â¤j¤jÀ°À°¤p§Ì
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-26 19:45
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-26 20:00 ½s¿è
¦^´_
1#
ÂŤÑÄR¦À
¦b shtRTD (RTD) ªí³æ¤º RecordPrice()
¥[¤J STSumifs WR, WR¡A ¦p¤U¡G
Option Explicit
Sub RecordPrice()
Dim WR As Long
Dim I As Byte
If Range("P2") < 1 Then Exit Sub
WR = Range("A1").End(xlDown).Row + 1
' ActiveWindow.ScrollRow = WR - 5 ' ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
(Range("F" & WR - 1) <> Range("F2")) Then ' Á`¶q¦³²§°Ê®É¤~°O¿ý
For I = 1 To 6
Cells(WR, I) = Cells(2, I)
Next 'I
STSumifs WR, WR ' ¸ê®Æ¦P¨B±N¼Æȼg¤J¨ì R¡AS¡AT ¤TÄ椺
End If
' With ActiveWindow
' If Intersect(Cells(WR, "B"), .VisibleRange) Is Nothing Then .SmallScroll 5
' End With
End Sub
Private Function STSumifs(ByVal endST As Long, Optional startST As Long = 3)
Dim cts As Long
Dim btm As Long
btm = Range("A1").End(xlDown).Row
For cts = startST To endST
Cells(cts, "R") = IIf(cts = 2, "", IIf(cts = 3, "=MAX(B3:B" & btm & ")", "=R" & (cts - 1) & "-1"))
Cells(cts, "R") = Cells(cts, "R").Value
Cells(cts, "S") = "=IF(SUMIFS($E3:$E" & btm & ",$D3:$D" & btm & ",S$1,$B3:$B" & btm & ",$R" & (cts - 1) & ")=0," & Chr(34) & Chr(34) & ",SUMIFS($E3:$E" & btm & ",$D3:$D" & btm & ",S$1,$B3:$B" & btm & ",$R" & (cts - 1) & "))"
Cells(cts, "S") = Cells(cts, "S").Value
Cells(cts, "T") = "=IF(SUMIFS($E3:$E" & btm & ",$D3:$D" & btm & ",T$1,$B3:$B" & btm & ",$R" & (cts - 1) & ")=0," & Chr(34) & Chr(34) & ",SUMIFS($E3:$E" & btm & ",$D3:$D" & btm & ",T$1,$B3:$B" & btm & ",$R" & (cts - 1) & "))"
Cells(cts, "T") = Cells(cts, "T").Value
Next cts
End Function
Sub Test()
Dim WR As Long
WR = Range("A1").End(xlDown).Row
STSumifs WR
End Sub
½Æ»s¥N½X
³Ì«á±¤§ Test() ¬O¥iÅý§A¤@¦¸¦Û°Ê°õ¦æ§ó´« ²Ä 3 ¦æ ~ ²Ä 4903 ¦æ
R¡AS¡AT ¤TÄ檺¸ê®ÆÈ¡C¦pªG¤£²§°Êªº¸Ü¡A´N¤£»Ý°õ¦æ¥¦¡C
¨ä¥¦µ{¦¡³¡¤À§¡«O¯d컪¡C¦]§ÚµL¨é°Ó³s½uµLªk´úª¾ª¬ªp¡C
§@ªÌ:
jackyq
®É¶¡:
2016-1-26 19:51
¥»©«³Ì«á¥Ñ jackyq ©ó 2016-1-26 19:55 ½s¿è
1, 3 ¤èªk¥i¦æ
R-T¦Cªº»Ý¨D¨C¤ÀÄÁ¤~¹Bºâ¤@¦¸
«oÅܦ¨³vµ§¹Bºâ
¬Æ¦ÜÁÙ³v¾ú¥v
¤£ºC³£Ãø
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2016-1-26 21:29
SUMIFS , ºâ¨Ó´NºC, ¦óªp¥þÄæ¤Þ¥Î¡I¡I¡I
¥[¨âÓ»²§UÄ椽¦¡¡G
¢Õ¢±¡G=IF($D2=S$1,$E2,"-")¡@¥k©Ô¢Ö¢±¡A¤U©Ô¨ì©³
¢á¢²¡G=SUMIF($B:$B,$R2,G:G)¡@¥k©Ô¢â¢²¡A¤U©Ô¨ì©³¡AÀx¦s®æ®æ¦¡¦Ûq¬°¡G#¡@¡]¢¯È¤£Åã¥Ü¡^
¥t¥~¡A®É¶¡¤½¦¡§ï¦p¤U¡G
¢Ò¢±¡G=--TEXT(A2,"hhmm")
¢á¢°¡G=--TEXT(S2,"hhmm")
¢â¢°¡G=--TEXT(T2,"hhmm")
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-27 09:29
¦^´_
1#
ÂŤÑÄR¦À
½Ð°Ñ¦Ò¡G
¦p¦ó§âӪѨC 5 ¤ÀÄÁªº¦¨¥æ»ù®æ°O¿ý¤U¨Ó¡H
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 09:38
¦^´_
2#
c_c_lai
°õ¦æ«á¦³´XÓ°ÝÃD¸òC¤j»¡¤@¤U
1.R¦C¦]¬°·|¸òµÛ«ü¼Æ³Ð·s°ª¦Ó§ïÅÜ©Ò¥H¤£¯à¬O¼g¦ºªº
2.R¦C¥u»Ýn§ì³Ì°ª¨ì³Ì§C°Ï¶¡200Ó¥ª¥k¡A¤£»Ýn¤@ª½¦V¤U¼W¥[
3.°õ¦æ«áS¸òT¦C¨S¦³¥ô¦ó°Ê§@
¥t¥~¡A¦pªG§Ú·Q¦bS¦C¤§«á§e²{8:45-13:45¤§¶¡ªº©Ò¦³µ²ªG³o¼Ëªº¸Ü¤½¦¡n«ç»ò§ï(·N«ä´N¬OS¼g¤J8:45¡BT¼g¤J8:46....¤@ª½¼g¨ì13:45)
PS.§Ú¬Ý¤F¤@¤U¥ÎR1C1ªº¤è¦¡¼g¤½¦¡¦n¹³´N¤£¥ÎÅܧó
=IF(SUMIFS(C5,C4,R1C,C2,R[-1]C18)=0,"",SUMIFS(C5,C4,R1C,C2,R[-1]C18))---¨C¤@¦æ³£³o¼Ë¡A³o¼Ë¦pªGn¼g¨ì13:45¤À´NÀ³¸Ó¤£¥Î¿é¤J¤Ó¦h¤½¦¡¤F
C¤j§Úªº·Qªk¬O³o¼Ë§A¬Ý¬Ý¥i¤£¥i¦æ
R¦C¤£°Ê¡AS¦C¦b8:46:01-8:46:05¤§¤º¼g¤J¤½¦¡¡A5¬í¤º¬Æ¦Ü§óµu®É¶¡§¹¦¨pºâ¡A¤§«á±N¤½¦¡¼g¦¨È¡AT¡BU¡BV¦C¨Ì¦¹Ãþ±À(´N¬OÅý°õ¦æ®É¶¡¤£n¤Ó¤[¡A°õ¦æ§¹¥ß¨è±N¤½¦¡¼g¦¨È)
³o¥u¬O¤p§Ìªº¤@Ó·Qªk¡AÁÙ½ÐC¤j¬Ý¬Ý¥i¤£¥i¦æ
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-27 11:51
¦^´_
6#
ÂŤÑÄR¦À
»¡¯uªº¡A§Ú¤£¤ÓÀ´ SUMIFS ªº¥Î·N¡A¥u¬O¨Ì¼Ëµe¸¬¡C
¦p§A¦³®É¶¡ªº¸Ü¡Aµyµy»¡©ú¤@¤U¥¦ªº¨Ï¥Î¤è¦¡»P§Aªº·Qªk¡A
¦p¦¹·|§ó©úÁA¨ä§@¥Î¡AÁÂÁ¡C
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2016-1-27 12:43
¦^´_
6#
ÂŤÑÄR¦À
8:45-13:45 = ¢²¢¯¢¯¤ÀÄÁ¡@
R¦C¥u»Ýn§ì³Ì°ª¨ì³Ì§C°Ï¶¡200Ó¥ª¥k
¡@
300*200 ÓSUMIFS¡A¶]±o°Ê¶Ü¡H¡H¡H
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2016-1-27 13:49
°µÓ°Æµ{¦¡¡A©T©w®É¶¡¥h CALL §Y¥i¡A
Äæ¦ì¤£°÷¡A¥u°µ¨ì 08:45 ~ 12:00 ¦@ 196 Äæ¡A¦Û¦æ¥h½Õ¾ã¡G
¡@
Sub ²Îp()
Dim R&, C&, Arr, Brr(1 To 200, 1 To 196), uMax, i&
R = Cells(Rows.Count, 1).End(xlUp).Row
If R < 2 Then Exit Sub
Arr = Range("A2:E" & R).Value
uMax = [R3] '³Ì¤j¦¨¥æ¼Æ
For i = 1 To UBound(Arr)
¡@¡@R = uMax - Arr(i, 2) + 1 '³Ì¤j¦¨¥æ¼Æ - ¢ÐÄ榨¥æ¼Æ + 1 = ¦C¦ì
¡@¡@If R < 1 Or R > 200 Then GoTo 101
¡@
¡@¡@C = Int(Arr(i, 1) * 1440) - 524 '¢ÏÄæ®É¶¡¤ÀÄÁ¼Æ - 8:44¤ÀÄÁ¼Æ = Äæ¦ì
¡@¡@If C < 1 Or C > 196 Then GoTo 101
¡@
¡@¡@Brr(R, C) = Brr(R, C) + Arr(i, 5)
101: Next
[S3].Resize(200, 196) = Brr
Beep
End Sub
°Ñ¦ÒÀÉ¡G
[attach]23188[/attach]
¡@
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 13:55
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-27 14:01 ½s¿è
¦^´_
7#
c_c_lai
C¤j§Ú»¡©ú¤@¤U¡A§Úªº¥Dn¥Î·N¬O¥ªÃä¬ö¿ý¶q¡A¥kÃä§Ú®Ú¾Ú®É¶¡©M¤£¦Pªº¦¨¥æÂI¦ì¨Ó¥[Á`
¨Ò¦p¡G
12:58:55 7775 1 1258 -1
12:58:56 7776 1 1258 -1
12:58:56 7776 1 1258 -1
12:58:58 7775 25 1258 1
12:58:58 7775 1 1258 -1
12:58:58 7775 1 1259 -1
12:59:00 7774 4 1259 -1
12:59:00 7774 1 1259 -1
12:59:00 7774 1 1259 -1
12:59:01 7775 1 1259 -1
12:59:01 7774 1 1259 -1
12:59:02 7774 1 1259 -1
12:59:02 7774 5 1259 -1
12:59:03 7774 12 1259 1
¥kÃä¬O±N12:58¸Ì±ªº©Ò¦³7775¡B7776¡B7774ªº¶q¥[Á`¡A¦ý¤£¥[Á`12:58¤À¥H¥~ªº¶q¡A³o´N¬O§Ú¬°¤°»ò¥ÎSUMIFSªºì¦]¡A¦pªG¥ÎSUMIF«h·|±N·í¤Ñ©Ò¦³¦P»ù¦ì©Î¦P®É¶¡ªº¼Æ¦r³£¥[Á`¡A¦Ó§Únªº¥u¬O¬YӮɶ¡¬q¸Ì±¦³¥X²{ªº»ù¦ìªº¥[Á`
¦p¤W©Ò¥Ü
7776 -2 12:58¤À¸Ì±7776¥X²{2¦¸¡A³Ì«á±ªº¼Æ¦r¥[Á`¬O-2
7775 -3 12:58¤À¸Ì±7775¥X²{3¦¸¡A³Ì«á±ªº¼Æ¦r¥[Á`¬O-3
7774 0 12:58¤À¸Ì±7774¥X²{0¦¸¡A³Ì«á±ªº¼Æ¦r¥[Á`¬O0
¤j·§´N¬O³o¼Ë¡AC¤j¯à²z¸Ñ¶Ü??
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 13:58
¦^´_
8#
ã´£³¡ªL
©Ò¥H¨ç¼Æ¤£¯àª½±µ¥´¦bÀx¦s®æ¤W±¡An¥ÎVBA¥B°õ¦æ§¹n°¨¤W±N¤½¦¡ÂনȡAn¤£µM¤@¼Ë·|©ìºC³t«×
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 13:59
¦^´_
9#
ã´£³¡ªL
¤j¤j¥i¥H»¡©ú¤@¤U¥Îªk©Mì²z¶Ü??§Ú¬Ý¤£¤ÓÀ´¡A©êºp
ÁÂÁ§AªºÀ°¦£
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 14:10
¦^´_
9#
ã´£³¡ªL
¤j¤j¦n¼F®`¡A¦ý½Ð±Ð¤@¤U
1.¬O¨C¤ÀÄÁ³£n¦Û¤v«ö²Îp¶Ü??
2.«ö²Îpªº¹Lµ{¤¤·|³y¦¨EXCELÅܺC¶Ü??
3.¦pªG§â¥¦§ï¦¨¦Û°Ê¨C¤ÀÄÁ²Îp¤@¦¸¥i¥H¶Ü??
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 14:14
¦^´_
7#
c_c_lai
C¤j§Únªº®ÄªG¤j·§¸ò7¼Ó¤j¤jªºªþ¥ó¤@¼Ë§A¬Ý¤@¤U
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-27 15:30
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-27 15:31 ½s¿è
¦^´_
12#
ÂŤÑÄR¦À
³o¬O§A쥻ªº©w¸q¡G
S3
=IF(SUMIFS($E:$E,$D:$D,S$1,$B:$B,$R2)=0,"",SUMIFS($E:$E,$D:$D,S$1,$B:$B,$R2))
T3
=IF(SUMIFS($E:$E,$D:$D,T$1,$B:$B,$R2)=0,"",SUMIFS($E:$E,$D:$D,T$1,$B:$B,$R2))
½Æ»s¥N½X
³o¬Oµ{¦¡½X¸ÑªRªºµ²ªG¡G
S3
=IF(SUMIFS($E3:$E4903,$D3:$D4903,S$1,$B3:$B4903,$R2)=0,"",SUMIFS($E3:$E4903,$D3:$4903,S$1,$B3:$B4903,$R2))
T3
=IF(SUMIFS($E3:$E4903,$D3:$D4903,T$1,$B3:$B4903,$R2)=0,"",SUMIFS($E3:$E4903,$D3:$D4903,T$1,$B3:$B4903,$R2))
½Æ»s¥N½X
µM«á¦AÂର¼ÆȪí¥Ü¡C
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-27 16:06
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-27 16:15 ½s¿è
¦^´_
14#
ÂŤÑÄR¦À
Function STSumifs(ByVal endST As Long, Optional startST As Long = 3)
1. Optional startST As Long = 3 ªº¥Î·N¡A¨Æ¥ý½á¤©¹w³]È¡F
¨Ò¦p:
Sub Test()
Dim WR As Long
WR = Range("A1").End(xlDown).Row ' ³Ì«á¤@µ§¸ê®Æ¦C
STSumifs WR
End Sub
¦b STSumifs ªº¨ç¦¡¤¤¡G
For cts = startST To endST
startST µ¥©ó 3¡A endST µ¥©ó WR (4903)
¦¹®É STSumifs WR = STSumifs WR, 3 ¤§·N¡A
Optional ªºÅܼƫŧi¡A¦p¥¼±a¤JÈ¡A«h¥H¨ä
³]©wªº¹w³]È (3) ¬°°Ñ¼ÆÈ¡C
*** ³o¬O¤@¦¸´N³B²z 3 ~ 4903 §¹²¦¡C
2. °²³]±a¤JȬ°¡G
WR = Range("A1").End(xlDown).Row + 1 ' ³Ì«á¤@µ§¸ê®Æ¦C + 1
STSumifs WR, WR
startST µ¥©ó WR¡A endST µ¥©ó WR (4094)
*** ³o¬O±N¸ê®Æ¼g¤J¨ì¸ê®Æ¿ýªº³Ì«á¦C¡C
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-27 17:04
¦^´_
16#
c_c_lai
«¢«¢¡A¦³ÂI½ÆÂø¡A¬Ý¤£¤ÓÀ´¡A¤£¹LÁÙ¬OÁÂÁÂC¤j¡A§Ú©ú¤Ñ¥ý¨Ó´ú¸Õ´£¤jªº¬Ý¬Ý
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2016-1-27 21:17
¤j·§°µÓ¨C¤ÀÄÁ¡e¦Û°Ê²Îp¡f¡A¤£¨¬¤§³B¦Û¦æ½Õ¾ã¡A
Y»P¦Û°Ê°O¿ý¢Ò¢Ò¢Ó¦³½Ä¬ð®É¡A¤]½Ð¦Û¦æ¥h±Æ°£¡I¡I
¡@
[attach]23189[/attach]
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 08:50
¦^´_
18#
ã´£³¡ªL
·Ç¤j¡A§Ú´ú¸Õ¤F¤@¤U¬Q¤Ñ¨ºÓ¤â°Êªºª©¥»¡Aµo²{»ù®æµLªk¦Û°Ê°O¿ý¤F¡A¥i¥H½Ðã¤jÀ°À°¦£¶Ü??
¤p§Ì²³æªº¥i¥H¡A¦ý¬O³o¹ï¤p§Ì¨Ó»¡¤w¸g¶W¥X¯à¤O½d³ò¤F¡A·PÁÂ
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 08:51
¦^´_
16#
c_c_lai
C¤j¡A¬Q¤Ñ7¼Óªºªþ¥ó¸g´ú¸Õ«áµLªk°O¿ý»ù®æ¡A¥i¥H½ÐC¤jÀ°§Ú¬Ý¬Ý¶Ü??
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 10:41
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-28 10:48 ½s¿è
¦^´_
20#
ÂŤÑÄR¦À
§A»¡ªº "¬Q¤Ñ7¼Óªºªþ¥ó¸g´ú¸Õ«áµLªk°O¿ý»ù®æ"¡A
7¼Ó ¨º¨Óªºªþ¥ó¡H
§A«üªº¬O¡H
Sub RecordPrice()
Dim WR As Long
Dim I As Byte
If Range("P2") < 1 Then Exit Sub
WR = Range("A1").End(xlDown).Row + 1
' ActiveWindow.ScrollRow = WR - 5 ' ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
(Range("F" & WR - 1) <> Range("F2")) Then ' Á`¶q¦³²§°Ê®É¤~°O¿ý
. For I = 1 To 6
Cells(WR, I) = Cells(2, I)
Next 'I
STSumifs WR, WR ' ¸ê®Æ¦P¨B±N¼Æȼg¤J¨ì R¡AS¡AT ¤TÄ椺
End If
' With ActiveWindow
' If Intersect(Cells(WR, "B"), .VisibleRange) Is Nothing Then .SmallScroll 5
' End With
End Sub
½Æ»s¥N½X
§Aªºµ{¦¡½X¤¤¦³¥[¤J³o¤@¦æ¶Ü¡H
STSumifs WR, WR ' ¸ê®Æ¦P¨B±N¼Æȼg¤J¨ì R¡AS¡AT ¤TÄ椺
½Æ»s¥N½X
§Aªºì©l½X¬O¦b Workbook_Calculate() ¸Ì°õ¦æªº¡A
½ÐÀˬd¤@¤U¡C
ã´£³¡ªLª©¤jªº¤À¨É¥çȱo§A¬ã¨s°Ñ¦Ò¡A§A·Qnªºµª®×
¬O¤£¬O¨º¼Ë¡H
§Úªºµ{¦¡½X STSumifs() ¥u¬O±N§A¥»¨Ó¤§¤½¦¡ (Formula) ¥Hµ{¦¡¼Ò¦¡»P¸ê®Æ¦P¨B¼g¤J
¦Ó¤w¡A¨S°µ¥ô¦ó¤§©µ¦ù³Ð·N¡C¦]¬°§Ú¤£À´§A¤½¦¡ªº§@¥Î¡C¬Ý¤Fã´£³¡ªLª©¤jªº¤À¨É
¤~µyµy©úÁA§Anªºµ²ªG¥i¯à·|¬O¦p¦¹¡AÁÙ¬O¥t¦³·Qªk¡H
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 12:16
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-28 12:23 ½s¿è
¦^´_
21#
c_c_lai
¥´¿ù¡AÀ³¸Ó¬O9¼Ó¤~¹ï
C¤j»¡¥[¨ºÓ¬O«ü§Aªºµ{¦¡§a¡A§Ú±«e¥Î9¼Óªºªþ¥ó¦A¶]¨S¥[¡A´N¬O»ù®æµLªk¬ö¿ý
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 12:57
¦^´_
22#
ÂŤÑÄR¦À
[attach]23193[/attach]
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 13:24
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-28 13:31 ½s¿è
¦^´_
23#
c_c_lai
C¤j§Ú§â¥¦¥þ³¡§Ë¦^¥h«á¡A¥i¥H°O¿ý¡A¦ý«o¤£¬O§Ú쥻³]©wªºÅܰʤ~¬ö¿ý¡A¬°¤°»ò·|³o¼Ë??
[attach]23194[/attach]
²{¦b¨SÅܰʤ]°O¿ý¡A¬OþÃä¥X¿ù¤F¶Ü??
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 13:35
¦^´_
24#
ÂŤÑÄR¦À
§A§â§A¥Ø«eªºExcelÀÉ®×À£ÁY¤W¶Ç¡A
²´¨£¬°¾Ì¡I
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 13:44
¦^´_
25#
c_c_lai
[attach]23195[/attach]
¨âÓÀɮסA³£¬Oã¤jªº¤@Ó¤â°Ê¡A¤@Ó¦Û°Ê¡A©êºpÀ³¸Ó¦ÂI¤W¶Çªº
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 14:06
¦^´_
26#
ÂŤÑÄR¦À
§A»¡ "¥i¥H°O¿ý¡A¦ý«o¤£¬O§Ú쥻³]©wªºÅܰʤ~¬ö¿ý"
¦¹¸Ü«ç»¡¡H
§A¶}±ÒÀɮ׫á¡A¥¦·|±q DDE ¶×¤J§Y®É¼Æ¾Ú¡A±µµÛ¥¦«K¦Û°Ê§PÂ_
Á`¶q¦³²§°Ê®É¤~°O¿ý¡A³oÓ¹Lµ{¤£¹ï¶Ü¡H"¤£¬O§A쥻³]©wªºÅܰʤ~¬ö¿ý"
¬O¬Æ»ò±¡§Î¡A¦]§Ú¨S¨é°Óªº³nÅé©Ò¥HµL±q±oª¾®t²§¦b¨ºùØ¡C
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 14:10
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-28 14:12 ½s¿è
¦^´_
27#
c_c_lai
¬Ý24¼ÓºI¹Ï¡AF¦C¦b¬ö¿ý®É¬Û¦P¤]°O¿ý¤F¦Ó¥B³£¬O¦P¼Ë¸ê®Æ¡AF42-F52³£¬O¬Û¦Pªº¡A¦ý¬O¥L¤]°O¿ý¤F¡A¥¿±`¤£À³¸Ó¬O³o¼Ë
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 14:43
¦^´_
28#
ÂŤÑÄR¦À
¨º§A¦AÆ[¹î¤@¤U F2 Ä檺¼Æ¾Ú¦³¨S¦³¤@ª½¦bÅÜ°Ê¡H
¦p¨S¡A«h§A¥²¶·«·s¦A¦¸±Ò°Ê¨é°Óªº³nÅé¡C
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2016-1-28 16:56
¦^´_
28#
ÂŤÑÄR¦À
Private Sub Workbook_Open()
Call ²Îp_±Ò°Ê
Application.RTD.ThrottleInterval = 0
Application.Calculation =
xlCalculationManual
'¶}±ÒÀÉ®×´N±N¡e¦Û°Ê«ºâ¡fÃö³¬¡A«ç¥i¯àIJ°Ê¡eCalculate¡f
¡@
End Sub
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 17:14
¦^´_
29#
c_c_lai
¦³¡A¤@ª½¦³ÅÜ°Ê
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 17:15
¦^´_
30#
ã´£³¡ªL
·Ç¤j¡A§Ú¤£¤ÓÀ´§Aªº·N«ä
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-28 18:24
¦^´_
31#
ÂŤÑÄR¦À
§A§â ThisWorkbook ¸Ìªº¨ç¼Æ¤º®eµy¥[²§°Ê
µM«á¤©¥HÀx¦s«á¡AÃö³¬«¶} Excel¡G
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.RTD.ThrottleInterval = 2000
Application.Calculation = xlCalculationAutomatic
End Sub
Private Sub Workbook_Open()
Application.RTD.ThrottleInterval = 0
Application.Calculation = xlCalculationManual
End Sub
½Æ»s¥N½X
ק令¡G
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.RTD.ThrottleInterval = 0
Application.Calculation = xlCalculationManual
End Sub
Private Sub Workbook_Open()
Application.RTD.ThrottleInterval = 2000
Application.Calculation = xlCalculationAutomatic
End Sub
½Æ»s¥N½X
¦A«·s¸Õ¸Õ¬Ý¡C
³o«K¬Oã´£³¡ªLª©¤j°Ý§Aªº°ÝÃD¡C
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-28 21:46
¦^´_
33#
c_c_lai
¥i¬O¤§«e³o¼Ë³]©w¯à¶]¡A¬°¤°»ò¥[¤Fã¤jªºµ{¦¡¤§«á´N¤£¯à¶]©O??
§@ªÌ:
c_c_lai
®É¶¡:
2016-1-29 07:34
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-1-29 07:38 ½s¿è
¦^´_
34#
ÂŤÑÄR¦À
§Ú«e«e«á«á¬d¬Ý¤F§A»Pã´£³¡ªLª©¤j¤W¶Ç¤À¨ÉªºÀɮסA
µo²{°ÝÃD¤´µM¥X¦Û©ó§Aªº¦Û¦æ¦A¾ã¦X¡Aã´£³¡ªLª©¤j
¤W¶Çªº¤º®e³£¨S¥[¤J Workbook_Open() ªº°õ¦æ¤º®e¡A
¬Æ¦Ü¦b²Ä¤@¦¸µ¹ªº Xl0000328.rar ¤]¥ç±N¥¦ Marked ±¼¡A
§A¥u±N¥¦¤À¨É¼Ò²Õ¤ºªº Sub ²Îp() ª½±µ¶K¤J¨ì§A쥻ªºÀɮפº
©Ò¥H¤~·|³y¦¨¥¼¯à¥¿±`°õ¦æªºì¦]¡C¬°À°§U§A§ó¯à©úÁAª©¤j
¼Ò²Õªº¹B§@¡A¯S¤©¦b¨ä¼Ò²Õ¤º¨C¤@´`Àô²Ó³¡¤ÀªR¸Ñ»¡¡A§Æ±æ§A
¯à¶i¤@¨B¾Ç²ß¨ì¦p¦ó¹B¥Î¡A¦P®É¯à¼W¶i§A¥»¨ªº¦Û§ÚÆ[¹î¤O¡C
§Ú±N¤T¤èªºµ{¦¡¼Ò²Õ¤©¥H²Õ¦X¤W¶Ç¤W¨Ó¡A§A´ú¸Õ¬Ý¬Ýµ²ªG¦p¦ó¡C
¸ÑÀ£«á«Kª½±µ¥Î¥¦¨Ó°õ¦æ´ú¸Õ¡A¦p¦¹¤~±o¥HÆ[´ú¨ä´ú¸Õµ²½×¡C
[attach]23203[/attach]
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-1-29 08:48
¦^´_
35#
c_c_lai
C¤j©p¯u¬O¤Ó²Ó¤ß¤F¡A·PÁ§A¡A§Ú¥ý¬ã¨s¬Ý¬Ý¡AÁÂÁÂ
§@ªÌ:
c_c_lai
®É¶¡:
2016-2-1 08:30
¦^´_
36#
ÂŤÑÄR¦À
³Ìªñ¦³ÂI¨Æ¯ÔÀÁ¤F¡C
§A¦b #10 ¸Ìªº»¡©ú¡Anªº¬O¡H
[attach]23219[/attach]
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-2-1 09:58
¦^´_
37#
c_c_lai
´ú¸ÕC¤jªºÀɮ׫á¡Aµo²{¥i¯à°õ¦æ¤Ó¦hªF¦è¡ADDE³£¤£¤Ó·|¸õ°Ê¤F¡A¤§«e1¬í¸õ7-8¦¸¡A²{¦b2-3¬í¸õ°Ê¤@¦¸
§@ªÌ:
c_c_lai
®É¶¡:
2016-2-1 11:17
¦^´_
38#
ÂŤÑÄR¦À
¨º§A¥Î§Ú¥Ø«e¤W¶ÇªºÀɮרӰµ´ú¸Õ¬Ý¬Ý¡C
´ú¸Õ§¹«á§i¶D§Ú¤@Ánµ²ªG¡C
§Ú¥ý§âã´£³¡ªLª©¤j¤À¨Éªº¥\¯à§ï¬° ²ÎpA()¡A
¥ý¤£¤©°õ¦æ¡A¦Ó¥h°õ¦æ§Ú¼W¥[¤§´ú¸Õ¼Ò²Õ
²Îp() ->dicStatics §AÆ[¹î¬Ý¬Ý¶i¦æ¶¶ºZ§_¡H
[attach]23220[/attach]
§@ªÌ:
c_c_lai
®É¶¡:
2016-2-1 11:48
¦^´_
38#
ÂŤÑÄR¦À
Sub ²Îp() ' L¡BM¡BN¡BO Äæ¦ì²Îp
Dim DD As Date
dicStatics
DD = Format(Now, "yyyy/mm/dd hh:mm") ' DD = 2016/1/28 ¤W¤È 12:41:00 : Date
TimeTxt = DD + 1 / 1440 ' TimeTxt = 2016/1/28 ¤W¤È 12:42:00 : Variant/Date
Application.OnTime TimeTxt, "²Îp" ' ¨C¤@¤ÀÄÁ¦Û°Ê¦A¦¸°õ¦æ¤@¦¸¡C
End Sub
Sub dicStatics()
Dim txt As String, dic As Object, dic2 As Object, A As Range, sp As Variant
' txt = [B2] & Left(CStr(Format([A2], "HH:MM:SS")), 5)
' txt = [B2] & Left(CStr([A2]), 5)
' MsgBox txt
Set dic = CreateObject("Scripting.Dictionary")
Set dic2 = CreateObject("Scripting.Dictionary")
For Each A In Range([A3], [A3].End(xlDown))
txt = A.Offset(, 1) & "," & Left(Format(A, "HH:MM:SS"), 5)
' dic(txt) = IIf(IsEmpty(dic(txt)), A.Offset(, 4).Value + 1, dic(txt)) + A.Offset(, 4).Value
' ¦b IsEmpty(dic(txt)) §PÂ_®É¡A dic(txt) ·|¦Û°Ê¥ý½á¤©¤@¦¸¤§ A.Offset(, 4).Value È¡AµM«á¦A¦¸
' Assign ¤@¦¸ªº A.Offset(, 4).Value È¡A ¦p A.Offset(, 4).Value = -1¡A«hµ²ªG·|Åܦ¨ -2¡C
' ¬O¬G§ï¦¨¦p¤U¤è¦¡¡Aª½±µ½á¤©¤@¦¸¤§ A.Offset(, 4).Value È¡A«hµ²ªG«K·|Åܦ¨ -1 (ªì©lȳ]©w)¡C
dic(txt) = dic(txt) + A.Offset(, 4).Value ' ¦¸
dic2(txt) = dic2(txt) + A.Offset(, 2).Value ' ¶q
Next
[M3].Resize(UBound(dic.Keys) + 1) = Application.Transpose(dic.Keys) ' ¯Á¤ÞÈ´N¬O Keys
[N3].Resize(UBound(dic.Keys) + 1) = Application.Transpose(dic.Items) ' ¸ê®Æ¤º®e´N¬O Items
[O3].Resize(UBound(dic2.Keys) + 1) = Application.Transpose(dic2.Items) ' ¸ê®Æ¤º®e´N¬O Items
With [M3].Resize(UBound(dic.Keys) + 1, 3) ' Range("M3:M" & [M3].End(xlDown).Row)
.Cells.Sort Key1:=.Cells(1), Order1:=xlDescending, Header:=xlNo ' xlAscending
End With
For Each A In Range([M3], [M3].End(xlDown))
sp = Split(A, ",")
A.Offset(, -1) = sp(0)
A = sp(1)
Next
End Sub
½Æ»s¥N½X
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-2-3 09:41
¦^´_
40#
c_c_lai
¥i¥H°O¿ý¡A¦ý¤£¥i²Îp¡AC¤jÁÂÁ¡A§Ú·Q§ÚÁÙ¬O§ï¥ÎAPI+EXCELªº¤è¦¡¶i¦æ¦n¤F¡A¤£¥Î¦A¶O¤ß¤F¡A¯uªº«D±`ªºÁÂÁ©p
§@ªÌ:
GBKEE
®É¶¡:
2016-2-3 09:49
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-3 10:34 ½s¿è
¦^´_
38#
ÂŤÑÄR¦À
ªþÀɸոլݬݥt¤@§@ªk
[attach]23240[/attach]
[attach]23238[/attach]
ThisWorkbook¼Ò²Õ
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean) '
'ÀÉ®×Ãö³¬:Ãö³¬Àɮ׳sµ²
'**Àɮצb¶}±Ò®É,¤£±Ò°Ê¸ß°Ý§ó·s¸ê®Æªºµøµ¡
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
'UpdateLinks ÄÝ©Ê ¶Ç¦^©Î³]©w XlUpdateLink ±`¼Æ¡A¦¹±`¼Æ¥i«ü¥X¬¡¶Ã¯§ó·s¤º´O OLE ³s½uªº³]©w¡CŪ/¼g¡C
'XlUpdateLinks ¥i¥H¬O³o¨Ç XlUpdateLinks ±`¼Æ¤§¤@¡C
'xlUpdateLinksAlways ¥Ã»·§ó·s«ü©w¬¡¶Ã¯ªº¤º´O OLE ³s½u¡C
'xlUpdateLinksNever ¥Ã»·¤£§ó·s«ü©w¬¡¶Ã¯ªº¤º´O OLE ³s½u¡C
'xlUpdateLinksUserSetting ®Ú¾Ú¨Ï¥ÎªÌ¹ï«ü©w¬¡¶Ã¯ªº³]©w¨Ó§ó·s¤º´Oªº OLE ³s½u¡C
End Sub
Private Sub Workbook_Open()
Application.Calculation = xlAutomatic ' ¬¡¶Ã¯³]¬°¦Û°Ê«ºâ
'Àɮצb¶}±Ò®É:¦Û°Ê§ó·s³sµ²
With ActiveWorkbook
.UpdateRemoteReferences = True
.SaveLinkValues = True
End With
End Sub
½Æ»s¥N½X
Sheet1(Sheets("RTD")) ¼Ò²Õªºµ{¦¡½X
Option Explicit
Dim D As Object, xTime As Date, Volume As Double
Private Sub Worksheet_Calculate()
If IsError([E2]) Or Time < #8:45:00 AM# Then Application.StatusBar = "µ¥Ô¶}½L¤¤": Exit Sub
'[E2] = "--" ¶}½L«eªº²Å¸¹
If Volume <> [E2] And [E2] <> "--" And Time >= #8:45:00 AM# And Time < #1:46:00 PM# Then
If D Is Nothing Then
Application.OnTime #1:46:00 PM#, "SHEET1.¬ö¿ý" '¦¬½L«á±j¨î¼g¥X³Ì«á¤@¤ÀÄÁªº¸ê®Æ
Application.StatusBar = False
Set D = CreateObject("scripting.dictionary")
Range("A" & Rows.Count).End(xlUp).CurrentRegion.Offset(1) = ""
Sheets("¬ö¿ý").UsedRange.Clear
xTime = TimeSerial(Hour(Time), Minute(Time), 0)
End If
If TimeSerial(Hour([B2]), Minute([B2]), 0) <> xTime And D.Count > 0 Then ¬ö¿ý '¤U¤@¤ÀÄÁ¶}©l®É,¬ö¿ý¤W¤@¤ÀÄÁªº¬ö¿ý
D([C2].Value) = D([C2].Value) + IIf([D2] <= 10, -1, 1) '¦r¨åª«¥ó:¬ö¿ý¦¨¥æ³æ¶q¤½¦¡ªºÈ
Volume = [E2]
xTime = TimeSerial(Hour([B2]), Minute([B2]), 0)
'**************** °O¿ý¨C¦¸¦¨¥æ¬ö¿ý***************
With Range("A" & Rows.Count).End(xlUp).Offset(1)
.Cells(1) = [B2] '®É¶¡
.Cells(1, 2) = [C2] '¦¨¥æ»ù
.Cells(1, 3) = [D2] '¦¨¥æ³æ¼Æ
.Cells(1, 4) = IIf([D2] <= 10, -1, 1) '¦¨¥æ³æ¶q¤½¦¡ªºÈ
End With
'************************************************
End If
End Sub
Private Sub ¬ö¿ý()
Dim R As Integer, C As Integer, X As Integer
Application.EnableEvents = False
With Sheets("¬ö¿ý")
If .[A1] = "" Then .[A1] = "®É¶¡"
With .Range("A" & .Rows.Count).End(xlUp).Offset(1)
R = .Row
.NumberFormat = "HH:MM"
.Value = xTime
.Resize(2).Merge
End With
C = 2
'°j°é:¦r¨åª«¥óªºKEY(ÃöÁä¦r) ³Ì¤jÈ - ³Ì¤pÈ.
For X = Application.Max(D.KEYS) To Application.Min(D.KEYS) Step -1
If D.EXISTS(X) Then '¦r¨åª«¥ó¦³³oÓKEY(ÃöÁä¦r)
If .Cells(1, C) = "" Then .Cells(1, C) = C - 1
.Cells(R, C) = X
.Cells(R, C).Interior.ColorIndex = 40
.Cells(R + 1, C) = D(X)
C = C + 1
End If
Next
End With
D.RemoveAll '«³],¦r¨åª«¥ó(¬ö¿ý¦¨¥æ»ùªº¤½¦¡ªºÈ)
'³o¦æªºµ{¦¡½X¥i§R°£¤W¤@¤ÀÄÁªº¸ê®Æ,¥[³tµ{¦¡ªº¹B¦æ
Range("A" & Rows.Count).End(xlUp).CurrentRegion.Offset(1) = "" '¦pn«O¯d¥iµù¸Ñ±¼¤£¥²°õ¦æ
Application.EnableEvents = True
End Sub
½Æ»s¥N½X
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-2-3 16:24
¦^´_
42#
GBKEE
G¤j¤µ¤Ñ¥xªÑ«ÊÃö¤F¡An¸Õ¤]nµ¥¹L¦~«á¤F¡AÁÂÁ©p
§@ªÌ:
jackyq
®É¶¡:
2016-2-3 17:20
¦^´_
43#
ÂŤÑÄR¦À
«ÊÃö¤@¼Ë¥i¸Õ
§@ªÌ:
ÂŤÑÄR¦À
®É¶¡:
2016-2-23 17:37
¦^´_
40#
c_c_lai
http://forum.twbts.com/viewthread.php?tid=16452&extra=
C¤j·s¦~§Ö¼Ö¡A¦³ªÅ¥i¥H³Â·ÐÀ°§Ú¬Ý¬Ý¶Ü??
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)