迟到不了的excel VB宏
Private Sub CommandButton1_Click() 列修改前 = "C" 列修改后 = "D" 列注释 = "E" Dim 上班时间 As Date 上班时间 = "09:00:00" Dim i As Integer For i = 2 To 33 If Cells(i, 列修改前) > 上班时间 Then Cells(i, 列修改后) = FormatDateTime(上班时间, vbShortTime) Cells(i, 列注释) = "刚好没迟到!" ElseIf Cells(i, 列修改前) <= 上班时间 And Cells(i, 列修改前) <> "" Then Cells(i, 列修改后) = Cells(i, 列修改前) End If Next End Sub
浙公网安备 33010602011771号