
Signature
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
Bob,
I should learn how to use Boolean instead of IF( ). Case in point +(B21<A21)*.....
If B21 = A21, there is no way to tell if it is the next day or the same day. I guess depending on the user's need, one may have to change the formula to
=B21-A21+(B21<=A21)*2400 to reflect 2400 for the lapse of one day.
Any comments?
Epinn
=B21-A21+(B21<A21)*2400

Signature
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
> How can I caculate military times such as 1800 hours to 400 hours for a
time
> sheet?
Bob Phillips - 30 Oct 2006 09:55 GMT
Bob,
> I should learn how to use Boolean instead of IF( ). Case in point +(B21<A21)*.....
> If B21 = A21, there is no way to tell if it is the next day or the same day.
> I guess depending on the user's need, one may have to change the formula to
> =B21-A21+(B21<=A21)*2400 to reflect 2400 for the lapse of one day.
The formula already has an algorithm to determine whether it goes over
midnight, that is whan the +(B21<=A21)*2400 is doing, it determines that it
goes over midnight if the end time is earlier than the start time, on the
basis that the task will not be greater than 24 hours. I suppose you could
argue he might start at 8:00 and finish at 8:00.