- ©«¤l
- 15
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 58
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-7-31
- ³Ì«áµn¿ý
- 2018-5-6
|
·P®¦GBKEE ª©¥D¡A³Ìªñ¤ÏÂдú¸Õ´X¦¸¡A¨ÌµMµLªk¦b09:00¶}½L«á¦Û°Ê¬ö¿ý¶}½L¶q¤]¤£·|¦b09:00¤§«e²M°£¬ö¿ýÄæ¦ì¡A¦ý¦pªG¬O¤â°Ê±Ò°Êªº¸Ü´N·|¦³È¡A¥H¤U¬O§Ú®M¥Î¦b§Úªºexcel¤Wªºµ{¦¡¡A¬O§_°ÝÃD¬O¥X¦bn¼g¤J¦Û°Ê±Ò°Êµ{¦¡ªºfunction!!
Option Explicit
'¦Û¿ïªÑ ¤u§@ªí¼Ò²Õ
Private Sub AWorksheet_Calculate()
Dim Rng As Range, E As Range
On Error Resume Next
If IsError([A9]) Then Exit Sub 'Àɮ׶}±Ò®ÉDEE·|¶Ç¦^ @N/A
If Time < #9:00:00 AM# Then
Set Rng = UsedRange.SpecialCells(xlCellTypeFormulas, xlErrors)
If Not Rng Is Nothing Then Debug.Print Time, Not Rng Is Nothing
With Range("A9", Range("A9").End(xlDown))
.Columns("K") = "" ''²MªÅHÄ檺²Ä¤@µ§¶q
End With
Exit Sub
End If
Set Rng = Range("A9", Range("A9").End(xlDown)).Columns("K") 'KÄæ(²Ä¤@µ§¶q)ªº¦ì¸m
If Time >= #9:00:00 AM# And Rng.Count <> Application.Count(Rng) Then
' KÄ檺ӼÆ<>KÄ榳¼Æ¦rªºÓ¼Æ,ÁÙ¦³ªÑ²¼²Ä¤@µ§¶q¨S¦³¿é¤J
Application.EnableEvents = False
For Each E In Rng.Cells
If E = "" And E.Cells(1, 2) > 0 Then
E = E.Cells(1, 2)
End If
Next
Application.EnableEvents = True
End If
End Sub |
|