Only whit one formulae?

A

an

Hello!

I would like a formulae to the next question:

Start - TimeOut - TimeIn - End
08:00 12:00 13:00 19:00 = 10:00 (is easy)

But if:
Start - TimeOut - TimeIn - End
08:00 19:00 = 11:00

Is possible to do this with only one formulae, please?

Thanks in advance.
an
 
A

Arvi Laanemets

Hi

=(End-Start)-(TimeIn-TimeOut)
i.e. something like
=(D2-A2)-(C2-B2)

Arvi Laanemets
 
J

JE McGimpsey

One way (assuming total elapsed time < 24 hours):

=MOD(MOD(B1-A1,1)+MOD(D1-C1,1),1)
 
J

JE McGimpsey

Note that this won't work if the times span midnight (unless B1 and C1
also span midnight).
 
A

an

Hi All!

Thanks for you.

However, through many attempt, more this:

=IF(E7=0;(G7-D7);IF(F7=0;(G7-D7);(E7-D7)+(G7-F7)))

with data between D7:H7 and formulae in I7

Many thanks.
an
 
H

Harald Staff

One more -allowing lunch around midnight as well:

=D1-A1+(D1<A1)-(C1-B1+(C1<B1))

HTH. Best wishes Harald
 

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