Calculate Workdays Between 2 Dates Excluding Holidays

Randal Flinn 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

Microsoft 365 and Office | SharePoint Server | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Jerry Xu-MSFT 7,961 Reputation points
    2021-03-25T02:26:36.25+00:00

    Hi, @Randal Flinn ,

    AFAIK, you will not be able to make a calculate column to do this. It cannot read data from another list. And there is no function available to identify whether one day is a holiday.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.