Forum Discussion

Robob's avatar
Robob
Copper Contributor
Apr 25, 2025
Solved

Syntax error on calculated column formula - date

 

Trying to get this formula to work in SharePoint. What I am trying to achieve is a column that calculates the date based on the input on two columns. I got this to work, but when one of the columns or both are blank, it puts an arbitrary date of 30/12/3799. I want this to be blank if one of the input columns is blank. 

So the current formula is: 

=DATE(YEAR([Review Date])),MONTH([Review Date])+[Review Cycle],DAY([Review Date]))

For example, Review Date is 1/1/2025 and Review Cycle is 6 then the output is 1/7/2025, which works fine.

What I tried to do based on research is 

=IF(ISBLANK([Review Date]),“”,DATE(YEAR([Review Date])),MONTH([Review Date])+[Review Cycle],DAY([Review Date]))

That gives me  a syntax error. I tried adding parentheses, but that doesn't seem to fix it. I am probably missing a bracket somewhere, not closing the parentheses.  

Any thoughts are welcome. 

 

  • =IF(OR(ISBLANK([Review Date]),ISBLANK([Review Cycle])),"",DATE(YEAR([Review Date]),MONTH([Review Date])+[Review Cycle],DAY([Review Date])))

1 Reply

  • Robob's avatar
    Robob
    Copper Contributor

    =IF(OR(ISBLANK([Review Date]),ISBLANK([Review Cycle])),"",DATE(YEAR([Review Date]),MONTH([Review Date])+[Review Cycle],DAY([Review Date])))

Resources