The timeclock system I use at work recently went through an upgrade that has messed up my macro that runs off of its reports. The old system would report an ending time of 12:00:00 AM if an employee forgot to clock out after their shift. I had the following piece of code in my macro that would pull out those rows into a separate worksheet in my workbook.
Const strBegTmCol = "H"
Const strEndTmCol = "J"
Const strShiftHrCol = "K"
n = wshSource.Range(strFilledCol & 65536).End(xlUp).Row
j = wshTarget.Range(strFilledCol & 65536).End(xlUp).Row
For i = n To 2 Step -1
If wshSource.Range(strEndTmCol & i) = "0" Then
j = j + 1
With wshSource.Rows(i)
.Copy Destination:=wshTarget.Rows(j)
End With
End If
Next i
The new data is coming back with a time of either 11:59:00 PM or 11:59:59 PM for a person that forgot to clock out. How can I modify the code to have it recognize that either of these entries in the cell should be pulled out to the new worksheet? It also looks like the data is coming in as text instead of a time, but I am not sure.
I have attached a small sterilized version of the data to show the fields.
Thanks in advance



