Calculating working hours

G

Guest

I want to calculate the number of working hours between two dates.

As an example: I receive a fault call and log the date and time. I also
record the date and time when it is resolved. I then need to calculate the
number of hours it took to resolve the call taking into account the fact that
I only work Monday - Friday & 9am to 5pm. I can calculate the hours between
the two points easily enough but can't find a way to account for the
non-working hours over night and the weekends.

I am using Excel 2000 & XP.

Any help/ideas gratefully received.

Thanks.
 
B

Biff

Hi!

Enter the date/time in a single cell:

A1 = 10/1/2004 2:25 PM

A2 = 10/15/2004 5:02 PM

=IF(NETWORKDAYS(A1,A1)=1,17/24-MOD(A1,1),0)
+IF(NETWORKDAYS(A2,A2)=1,MOD(A2,1)-9/24,0)+NETWORKDAYS(A1+1,A2-1)*8/24

Format the cell as [h]:mm

Also, if you want to account for holidays, that is, exclude holidays because
those days are not worked, then you need to make a list of those holidays
and include a reference to that list as a 3rd argument to the Networkdays
function.

Biff
 

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