If Not ((Sheet1.Cells(10, 3) = "13:44:59") Or (Sheet1.Cells(10, 3) = "13:45:00")) Then
i = Round(DateDiff("s", TimeValue("09:00:00"), TimeValue(Sheet1.Cells(3, 3))) / 60 / 5, 0) + 1
Do While (Sheet3.Cells(i, 1) <> "")
If (Sheet3.Cells(i, 1) = Mid(Sheet1.Cells(3, 3), 1, 5)) Then
Sheet3.Cells(i, 2) = Sheet1.Cells(20, 3)
Sheet3.Cells(i, 3) = Sheet1.Cells(7, 3)
Exit Do
End If
i = i + 1
Loop
i = Round(DateDiff("s", TimeValue("09:00:00"), TimeValue(Sheet1.Cells(3, 3))) / 60, 0) + 1
j = i
Do While (Sheet3.Cells(i, 6) <> "")
If (Sheet3.Cells(i, 6) = Mid(Sheet1.Cells(3, 3), 1, 5)) Then
Sheet3.Cells(i, 7) = Sheet1.Cells(4, 3)
Sheet3.Cells(i, 8) = Sheet1.Cells(11, 3)
Exit Do
End If
i = i + 1
Loop
If (InStr(5, Sheet1.Cells(10, 3), ":30") > 0) Then
ActiveWorkbook.Save
End If