Still problems with calculation of time
Assuming Start Time is in cell A2, End time is in cell B2, the exception
start time (18:00) in cell C2, and the exception end time (22:00) in cell D2.
NOTE: for c2 and d2, if these are standard, you can put in the actual
value....
Also, 16:00 to 21:00 is 5 hours, not 6.
But here is a formula:
=(MIN(IF(B2<A2,B2+1,B2),IF(D2<C2,D2+1,D2))-MAX(A2,C2))*24
--
John C
"H. Nissen" wrote:
I have already had very good help, but unfortunately, none of the solutions
which can handle the needs I have to consider.
I can only make a form that works properly, either when finishing is before
24:00 or after 24:00. I can not make a form that can handle END times both
before and after 24:00.
So I have to just to try once mo)
I would be very happy if I could get help to produce a formula which is able
to calculate hours in a time when "finishing" can be both before and after
at. 24:00.
I can only make a formular, who works
For example: Start: 16:00, End: 6:00 total hours = 14 ,
and hours of these between 18:00 to 22:00 = 4
and another example: Start: 16:00, End: 21:00 total hours = 6,
and hours of these between 18:00 to 22:00 = 3
It is the counting of the time between 18:00 and 22:00 there is a problem,
totaltid is not necessary to count.
Sincerely,
H. Nissen
|