´Æ¤âªºexcel¹Bºâ°ÝÃD¡A¦p¦ó§ïµ½??
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
´Æ¤âªºexcel¹Bºâ°ÝÃD¡A¦p¦ó§ïµ½??
¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-1-26 14:18 ½s¿è
©ú²ÓÅÜ°Ê°O¿ý.rar (148.6 KB)
ªþÀɬ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§Ì |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
|
|
|
|
|
|
- ©«¤l
- 319
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 309
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2k
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-6-24
- ³Ì«áµn¿ý
- 2024-4-27
|
¦^´_ 43# ÂŤÑÄR¦À
«ÊÃö¤@¼Ë¥i¸Õ |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 42# GBKEE
G¤j¤µ¤Ñ¥xªÑ«ÊÃö¤F¡An¸Õ¤]nµ¥¹L¦~«á¤F¡AÁÂÁ©p |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-2-3 10:34 ½s¿è
¦^´_ 38# ÂŤÑÄR¦À
ªþÀɸոլݬݥt¤@§@ªk
EX.rar (28.72 KB)
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 |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 38# ÂŤÑÄR¦À
¨º§A¥Î§Ú¥Ø«e¤W¶ÇªºÀɮרӰµ´ú¸Õ¬Ý¬Ý¡C
´ú¸Õ§¹«á§i¶D§Ú¤@Ánµ²ªG¡C
§Ú¥ý§âã´£³¡ªLª©¤j¤À¨Éªº¥\¯à§ï¬° ²ÎpA()¡A
¥ý¤£¤©°õ¦æ¡A¦Ó¥h°õ¦æ§Ú¼W¥[¤§´ú¸Õ¼Ò²Õ
²Îp() ->dicStatics §AÆ[¹î¬Ý¬Ý¶i¦æ¶¶ºZ§_¡H
©ú²ÓÅÜ°Ê°O¿ý.rar (192.18 KB)
|
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 37# c_c_lai
´ú¸ÕC¤jªºÀɮ׫á¡Aµo²{¥i¯à°õ¦æ¤Ó¦hªF¦è¡ADDE³£¤£¤Ó·|¸õ°Ê¤F¡A¤§«e1¬í¸õ7-8¦¸¡A²{¦b2-3¬í¸õ°Ê¤@¦¸ |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 36# ÂŤÑÄR¦À
³Ìªñ¦³ÂI¨Æ¯ÔÀÁ¤F¡C
§A¦b #10 ¸Ìªº»¡©ú¡Anªº¬O¡H
|
|
|
|
|
|
|