# Calculate Workdays Between 2 Dates Excluding Holidays

311 Reputation points
2021-03-24T19:32:45.537+00:00

Hello,

I have a calculation that will generate the number of workdays between two dates.

=IF(ISERROR(DATEDIF(Created,[Shutdown Start],"d")),"",(DATEDIF(Created,[Shutdown Start],"d"))-INT(DATEDIF(Created,[Shutdown Start],"d")/7)*2-IF((WEEKDAY([Shutdown Start])-WEEKDAY(Created))<0,2,0)-IF(OR(AND(WEEKDAY([Shutdown Start])=7,WEEKDAY(Created)=7),AND(WEEKDAY([Shutdown Start])=1,WEEKDAY(Created)=1)),1,0)-IF(AND(WEEKDAY(Created)=1,(WEEKDAY([Shutdown Start])-WEEKDAY(Created))>0),1,0)-IF(AND(NOT(WEEKDAY(Created)=7),WEEKDAY([Shutdown Start])=7),1,0))

Is there a way to also exclude the Holidays? I was wondering if a separate list of Holiday Dates would help.

Thanks

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,599 questions