time clock wrap around midnight

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

For example I have two times entered as 23:30 and 1:45 (but the next day) we
are not entering the date just the time. Subtracting the two gets the
correct answer but when the times wrap around midnight (as above) then there
is a negative time difference and it is wrong.

How can I keep entering just the basic time (without date) and take the
difference and make this difference work around midnight?

thanks
 
With start time in A1 and end time in B1


=B1-A1+(B1<A1)

or

=MOD(B1-A1,2)

don't forget to format result as time
 
Back
Top