Time Calculations -sunbratction

D

davidbrowne17

whats the best way to calculate the time worked given a start and fins
time

i.e.

A1 - time started ( 24hr clock Hr:Min)
A2 - time finished ( 24hr clock Hr:Min)

A3 - time worked ( hrs & Mins)

i thought this would be simple unill i tried!

Thank
 
F

Frank Kabel

Hi
why not
=A2-A1
and format the result as time

If you have working times which starts on day one and ends on day 2 try
=(A2<A1)+A2-A1
 
J

JE McGimpsey

XL stores times as fractional days (numbers), so if A1 and A2 and in the
same day, you can just use

A3: =A2-A1

and format as hh:mm

If the period spans midnight, you need to add 1 to the "later" time to
compensate for the rollover to 0:00 at midnight. You can use XL's
automatic coercion of boolean (TRUE/FALSE) values to 1/0, respectively:

A3: =A2-A1+(A2<A1)

or, a bit more esoterically:

A3: =MOD(A2-A1,1)

If needed, you can then get hour and fractional hours by multiplying by
24.
 

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