Forum Discussion
Calculate working days in Sharepoint
Thank you for your answer but I have tried that one without any luck. I tried it again just now and still I get an error message.
I have changed "start date" and "end date" to the names of my columns and I have checked the code but still error.
I don't know why. Even if I don't think so but can it be because I have swedish as language in Sharepoint?
- Chris GullicksenDec 27, 2019Iron Contributor
So you added a calculated column formatted as text and used the formula ensuring the column names match your column names? (Case and space sensitive) I tested it on a classic calendar and it worked when I looked at the all events list view.
Also please give us some more details to the type of list you are using along with some screen shots or more information about the "error" you are getting.
- nima_einarmattssonDec 30, 2019Copper Contributor
Yes. I have tried and double tried but still get the error. When I scan through different forums I can see that people get some formulas to work but when I try the same formulas it doesn't work for me. I have attached 3 screenshots.
I hope that you'll see something in them that I'm doing wrong....
- Chris GullicksenDec 30, 2019Iron Contributorin screen shot "Print1.png" what column is your calculated column? Here is what your calculation should be if you make a new calculated column given your column names.
IF(ISERROR(DATEDIF([Skapad],[Leveransdatum],”d”)),””,(DATEDIF([Skapad],[Leveransdatum],”d”))+1-INT(DATEDIF([Skapad],[Leveransdatum],”d”)/7)*2-IF((WEEKDAY([Leveransdatum])-WEEKDAY([Skapad]))<0,2,0)-IF(OR(AND(WEEKDAY([Leveransdatum])=7,WEEKDAY([Skapad])=7),AND(WEEKDAY([Leveransdatum])=1,WEEKDAY([Skapad])=1)),1,0)-IF(AND(WEEKDAY([Skapad])=1,(WEEKDAY([Leveransdatum])-WEEKDAY([Skapad]))>0),1,0)-IF(AND(NOT(WEEKDAY([Skapad])=7),WEEKDAY([Leveransdatum])=7),1,0))