Hi,Try this to start.
Place your "from" times in Column "A" and your "to" Times in Column "B".
Run the code, the resulting time differences will be in column "C". and a Msgbox.
If you don't want the Msgbox, delete it from the code.
Make sure columns "A" & "B" are formatted as numbers, and Column "C" as Time
If you want it altered let me know
Dim cl As Range, TT
Dim aTl, aTr, bTl, bTr, oSa, oSb, Ts, sTr, sTl
For Each cl In Range(Range("b1"), Range("b" & Rows.Count).End(xlUp))
aTl = Split(Format(cl.Offset(0, -1), "0.00"), ".")(0)
aTr = (Split(Format(cl.Offset(0, -1), "0.00"), ".")(1)) / 60
bTl = Split(Format(cl.Value, "0.00"), ".")(0)
bTr = (Split(Format(cl.Value, "0.00"), ".")(1)) / 60
oSa = aTl + aTr
oSb = bTl + bTr
Ts = oSb - oSa
sTr = Split(Format(Ts, "0.00"), ".")(0)
If sTr < 10 Then sTr = Right(sTr, 1)
sTl = ("." & (Split(Format(Ts, "0.00"), ".")(1))) * 60
TT = sTr & ":" & sTl
cl.Offset(0, 1).Value = TT
MsgBox TT
Next
Regards Mick
Bookmarks