Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.Paste
ActiveCell.FormulaR1C1 = _
"=IF(AND(VALUE(R[-2]C[13])=1,R[-2]C[8]<VALUE(""8:30""))=TRUE,""早班上班打卡"",IF(AND(VALUE(R[-2]C[13])=1,R[-2]C[8]>VALUE(""8:30""),R[-2]C[8]<VALUE(""12:00""))=TRUE,""早班迟到打卡"",IF(AND(R[-2]C[13]=1,R[-2]C[8]>=VALUE(""12:00""),R[-2]C[8]<=VALUE(""13:00""))=TRUE,""下午上班打卡"",IF(AND(VALUE(R[-2]C[13])=1,R[-2]C[8]>VALUE(""13:00""),R[-2]C[8]<VALUE(""17:00""))=TRUE,""下午迟到打卡"",""""))))&IF(AND(R[-2]C[13]>=2,ABS(R[-2]C[8]-R[-3]C[8])<=0.0007)=TRUE,""重复打卡"",IF(AND(R[-2]C[13]>=2,ABS(R[-2]C[8]-R[-3]C[8])>0.0007,R[-2]C[8]<VALUE(""8:30""))=TRUE,""早班重复上班打卡"",IF(AND(R[-2]C[13]>=2,ABS(R[-2]C[8]-R[-3]C[8])>0.0007,R[-2]C[8]>VALUE(""8:30""),R[-2]C[8]<VALUE(""12:00""))=TRUE,""早班早退打卡"","""")))&IF(AND(R[-2]C[13]>=2,ABS(R[-2]C[8]-R[-3]C[8])>0.0007,R[-2]C[8]>=VALUE(""12:00""),R[-2]C[8]<=VALUE(""13:00""))=TRUE,""下午上班打卡"",IF(AND(R[-2]C[13]>=2,ABS(R[-2]C[8]-R[-3]C[8])>0.0007,R[-2]C[8]>VALUE(""13:00""),R[-2]C[8]<VALUE(""17:00""))=TRUE,""下午早退打卡"",""""))&IF(AND(R[-2]C[13]=0,R[-2]C[8]<VALUE("
"8:30""))=TRUE,""早班上班打卡"",IF(AND(R[-2]C[13]=0,R[-2]C[8]>VALUE(""8:30""),R[-2]C[8]<VALUE(""12:00""))=TRUE,""早班早退打卡"",IF(AND(R[-2]C[13]=0,R[-2]C[8]>=VALUE(""12:00""),R[-2]C[8]<=VALUE(""13:00""))=TRUE,""下午上班打卡"",IF(AND(R[-2]C[13]=0,R[-2]C[8]>VALUE(""13:00""),R[-2]C[8]<VALUE(""17:00""))=TRUE,""下班早退打卡"",""""))))"
Range("A4").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
End Sub |