Change your formula as follows and drag down
K6=IF(W6="",IFERROR(V6-A$1,""),W6)
Change the number format of the cells from K6 to mm:ss
And replace your routine with this
Code:Sub RunEveryMinute() With Worksheets(1) Range("A1").Value = Format(Now, "hh:mm:ss") End With If Range("P6").Value = "Completed" Then Range("W6").Value = Range("K6").Value End If If Range("K6").Value < TimeValue("00:30:00") And Range("P6").Value <> "Completed" Then MsgBox "Alert! Alert! Abort Mission!. This file will explode in " & Range("K6").Text & " minutes. Turn computer off if you want to live" End If Call OnTimeMacro End Sub




Reply With Quote
Bookmarks