Time Calculation

  • Thread starter Thread starter S_ark
  • Start date Start date
S

S_ark

I am looking for a way to calculate time in excell.

Here's what I need to do:

I have a worksheet that contains start date and time of a job, I hav
to calculate the total working hours since the begining date that'
mentioned till now (every time I run the sheet)

The problem is that I have a few departments in this table, and ec
department has diffrent working hours and days (some work 24/7, som
has the regular working hours etc. etc.)
(I dont mind opening difrents macros that would calculate the times b
ech departments time and I'll later use an if rule to choose from the
(there are only about 3-4 departments))

Does anybody have a MACRO or knows anyway in which it can be done ?

Thank's.
- Danny
 
use the NetWorkdays function from the analysis toolpak to get the number of
workdays. Then you can multiply it by the hours per workday. then deal
with fractions associated with the start day and end/current day if
appropriate. This won't work if the workweek is not 5 days, Monday -
Friday. You would have to handle those as an exception. If 24/7, just
subtract the start date from the end/current day and add 1, then multiply by
hours.
 
If networkdays doesn't do the trick, there's an "Hours affected by Dates"
formula on my website.
 
Back
Top