Time Calculations -sunbratction

  • Thread starter Thread starter davidbrowne17
  • Start date Start date
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
 
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
 
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.
 
Back
Top