Calculate the duration between the end time and start time of anot
Hi
For worked hours:
=IF(OR(D2="",E2=""),"",E2-D2+(E2<D2))
For off hours:
=IF(OR(B3="",D3=""),"",(B3-B2+D3-(E2<D2))-E2)
Format columns with both formulas as Custom "[hh]:mm"
--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )
"Rusty" wrote in message
...
What I need to calculate is the duration, in [hh]:mm between the end time
of
a shift on one day and the start time of the next shift on another day.
Where
this gets complicated, the next start time could be up to 14 days after
the
end of the previous shift. How can I write a function to calculate these
total hours?
Ex: Shift 1: 5/1/08 - 17:30 to 05:30 next day
Shift 2: 5/2/08 - 17:30 to 05:30 next day (returns 12:00 for the
duration between shifts)
Shift 3: 5/13/08 05:30 to 17:30 (how do I automatically calculate time
between 5/3/08 05:30 and 5/13/08 05:30 and have this same function
calculate
time between 5/2/08 05:30 and 5/2/08 17:30?)
My columns are A(day); B(date); C(Shift [i.e. assigned working shift]);
D(Start Time); E(End Time); F(Duration of Hours Worked); G(Duration of
Hours
OFF)
Every day/date is a new row and none are skipped.
|