- ©«¤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
        
|
¦^´_ 4# faye59 - Option Explicit
- Sub Ex()
- Dim D As Object, i As Integer , xTime As Date
- Set D = CreateObject("Scripting.Dictionary") '¦r¨åª«¥ó
- With Workbooks.Open("\\Tank\Access\B.xlsx").Sheets("Time").Range("A:A")
- i = 2
- Do While .Cells(i) <> ""
- If Not IsDate(.Cells(i, "B")) Then MsgBox .Cells(i) & " - " & .Cells(i, "B") & " ¤£¬O¥¿½T®É¶¡ ": End
- D(.Cells(i).Text) = Application.Text(.Cells(i, "B"), "HH:MM")
- i = i + 1
- Loop
- End With
- With Sheets("Form").Range("A:A")
- i = 2
- Do While .Cells(i) <> ""
- If D.EXISTS(.Cells(i).Text) Then
- .Cells(i, "E") = D(.Cells(i).Text)
- xTime = Application.Text(.Cells(i, "C") - .Cells(i, "B"), "HH:MM")
- If xTime >= D(.Cells(i).Text) Then
- .Cells(i, "D") = "¨¬°÷"
- Else
- .Cells(i, "D") = "¤£¨¬°÷"
- End If
- Else
- .Cells(i, "d") = "¨S·|û"
- End If
- i = i + 1
- Loop
- End With
- End Sub
½Æ»s¥N½X |
|