time clock wrap around midnight

B

BillO

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
 
P

Peo Sjoblom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top