Forum Discussion

KCarp0113's avatar
KCarp0113
Copper Contributor
Mar 09, 2023
Solved

Need help with syntax error

Hello! I am having issues with a nested IF formula, with ISBLANK and WORKDAY functions in a calculated column.  I have tested the formula in Excel and it worked fine. I have tried changing all the co...
  • RobElliott's avatar
    Mar 10, 2023

    KCarp0113 you're getting the syntax error because the WORKDAY function doesn't exist in SharePoint, it is only for Excel. 

     

    For part of your fomula it looks as though you want to get the number of working days between 2 dates. So you need to be using a combination of DATEDIF AND WEEKDAY (where Start and End are my date/time columns):

    =(DATEDIF(Start,End,"D"))-INT(DATEDIF(Start,End,"D")/7)*2-IF(WEEKDAY(End)<WEEKDAY(Start),2,IF(OR(WEEKDAY(End)=7,WEEKDAY(Start)=1),1,0))

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources