ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculating Project Time (https://www.excelbanter.com/excel-worksheet-functions/190366-calculating-project-time.html)

Tammy H

Calculating Project Time
 
I am trying to calculate total project time. Time should not include
Weekends or Holidays. Work Time is 7:00 a.m. until 5:00 p.m.

I have the below formula but it is not calculating correctly.

=(NETWORKDAYS(A2,B2,C1:C8)-1)*(D1-C1)+IF(NETWORKDAYS(B2,B2),MEDIAN(MOD(B2,1),D1,C1), D1)-MEDIAN(NETWORKDAYS(A2,A2)*MOD(A2,1),D1,C1)

Where the start and end date is formatted as 5-20-2008 9:04 and
A2 = Start Date/Time formated like
B2 = End Date/Time
C1:C8 = Holiday range
C1 = Start time (7:00)
D1 = End Time (5:00)

I have the following example that is calculating incorrectly: Time
calculated is 4:6:55

A2 = 5-02-2008 14:04
B2 = 5/16/2008 18:26


Any help would be appreciated.




Tammy H

Calculating Project Time
 
I just noticed an error when typing my formula below. The Holiday range is
not c1:c8 but N2:n10


"Tammy H" wrote:

I am trying to calculate total project time. Time should not include
Weekends or Holidays. Work Time is 7:00 a.m. until 5:00 p.m.

I have the below formula but it is not calculating correctly.

=(NETWORKDAYS(A2,B2,C1:C8)-1)*(D1-C1)+IF(NETWORKDAYS(B2,B2),MEDIAN(MOD(B2,1),D1,C1), D1)-MEDIAN(NETWORKDAYS(A2,A2)*MOD(A2,1),D1,C1)

Where the start and end date is formatted as 5-20-2008 9:04 and
A2 = Start Date/Time formated like
B2 = End Date/Time
C1:C8 = Holiday range
C1 = Start time (7:00)
D1 = End Time (5:00)

I have the following example that is calculating incorrectly: Time
calculated is 4:6:55

A2 = 5-02-2008 14:04
B2 = 5/16/2008 18:26


Any help would be appreciated.





All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com