View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default time clock wrap around midnight

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

--
Regards,

Peo Sjoblom



"BillO" wrote in message
...
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