C
cwren
I need to calculate weekday hours in particular month; excludin
holidays and weekends, based on 10 hr work days
holidays and weekends, based on 10 hr work days
Arvi Laanemets said:Hi
Another way
Have all holydays at least for date interval you have to deal with in table
(a single-column one will do, but you can have holiday names in another
column to better overview) on sheet Holydays (p.e. Holydays!$A$2:$A$100 - it
will cover holidays nearly for a decade)
A2=year
B2=month
MonthsWorkingHours: =
NETWORKDAYS(DATE(A2,B2,1),DATE(A2,B2+1,0),Holydays!$A$2:$A$100)*10
(it's a regular one)
When 1st and last of month are excluded by default, whatever days they are
MonthsWorkingHours: =
NETWORKDAYS(DATE(A2,B2,2),DATE(A2,B2+1,-1),Holydays!$A$2:$A$100)*10
With holidays table defined as named range
Holydays=OFFSET(Holydays!$A$2,,,COUNTIF(Holydays!$A:$A,"<>")-1,1)
yo can modify the last formula to
MonthsWorkingHours: =
NETWORKDAYS(DATE(A2,B2,2),DATE(A2,B2+1,-1),Holydays)*10