0

Here is an excel formula to calculate number of workdays between two dates:

=IFERROR( IF ( A2 = B2, 0, NETWORKDAYS( A2, B2 ) -1 ), "" )

is it possibe to write this formula in SharePoint List as a calculated column please?

Thanks

1

According to my research, the NETWORKDAYS function can be used in excel, but not for SharePoint.

Please following steps:

1.Create two "Date and Time" column named StartDate and EndDate in list.

enter image description here

2.Then, create one "Calculated" column named Workdays

3.Please use the below Formula:

IF(ISERROR(DATEDIF([StartDate],[EndDate],”d”)),””,(DATEDIF([StartDate],[EndDate],”d”))+1-INT(DATEDIF([StartDate],[EndDate],”d”)/7)*2-IF((WEEKDAY([EndDate])-WEEKDAY([StartDate]))<0,2,0)-IF(OR(AND(WEEKDAY([EndDate])=7,WEEKDAY([StartDate])=7),AND(WEEKDAY([EndDate])=1,WEEKDAY([StartDate])=1)),1,0)-IF(AND(WEEKDAY([StartDate])=1,(WEEKDAY([EndDate])-WEEKDAY([StartDate]))>0),1,0)-IF(AND(NOT(WEEKDAY([StartDate])=7),WEEKDAY([EndDate])=7),1,0))

enter image description here

4.When you enter date, SharePoint will automatically calculated the number of working days between the two dates.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.