Still problems with calculation of time

H

H. Nissen

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 more:)

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
 
M

Mike H

Hi,

Try this
=(B1-A1+(B1<A1))*24

Start time In A1
End time In B1

A1 and B1 can be on the same day or roll over midnight and it will give the
difference in hours.

Mike
 
S

Stefi

If Start is in col K, End in col L then try
=IF(L2>K2,L2,1+L2)-K2

Regards,
Stefi
„H. Nissen†ezt írta:
 
H

H. Nissen

Hi Mike H.

Thx for your answeer, pls. see my reply to Stefi :)

Kinds regards
H. Nissen
 
J

John C

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
 
H

H. Nissen

Hello John C

There it was, exactly what I was missing. I owe you a big thank you for your
kind assistance. Thank you:)

With warm regards,
Hans N.

PS! You are totally right, 16 = 21 is 5, not 6, you now understand why i
need the timecalculator? :)





"John C" skrev:
 

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