|
Sub bijiao()
Range("m2:m65536").ClearContents
Dim x, y, z As Integer
For x = 2 To [a65536].End(xlUp).Row
If Cells(x, "k") = "星期一" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期二" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期二" And Format(Cells(x, "j"), "hh:mm;ss") >= "14:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "15:30:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期三" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期三" And Format(Cells(x, "j"), "hh:mm;ss") >= "14:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "15:30:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期四" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期四" And Format(Cells(x, "j"), "hh:mm;ss") >= "14:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "15:30:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期六" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期六" And Format(Cells(x, "j"), "hh:mm;ss") >= "14:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "15:30:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期日" And Format(Cells(x, "j"), "hh:mm;ss") >= "09:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "10:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期日" And Format(Cells(x, "j"), "hh:mm;ss") >= "14:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "15:30:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "k") = "星期五" And Format(Cells(x, "j"), "hh:mm;ss") >= "15:30:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "17:00:00" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "i") = "2015/3/7" And Format(Cells(x, "j"), "hh:mm;ss") >= "00:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "23:59:59" Then
Cells(x, "m") = "按时签到"
Else
If Cells(x, "i") = "2015/3/6" And Format(Cells(x, "j"), "hh:mm;ss") >= "00:00:00" And Format(Cells(x, "j"), "hh:mm;ss") <= "23:59:59" Then
Cells(x, "m") = "按时签到"
Else
Cells(x, "m") = "未按时签到"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next
End Sub
|
|