SOLVED

Calculated Column using ISBLANK and IF, with date Columns

Copper Contributor

Hi All,

 

I need help with a calculated column in SharePoint.

 

I have 2 dates that I want to use to calculate the number of dates between them. My current formula (with my custom column names) is;

 

=IF(ISBLANK([1ST PROBATION REPORT RECEIVED DATE], "", NETWORKDAYS([1ST PROBATION REPORT RECEIVED DATE], [1ST PROBATION REPORT DUE DATE]))

 

I keep receiving a syntax error when accepting, with correlation ID fe39d3a0-b092-7000-0b42-686cd4298b68.

 

I've tried replacing the "," with ";", and this also does not resolve the syntax error.

 

Thanks upfront for any assistance.

3 Replies
best response confirmed by Anubis66614 (Copper Contributor)
Solution

@Anubis66614 NETWORKDAYS() function is not supported in SharePoint calculated formulas.

 

You have to use the formula like: 

 

=IF(ISBLANK([1ST PROBATION REPORT RECEIVED DATE]),"",DATEDIF([1ST PROBATION REPORT RECEIVED DATE],[1ST PROBATION REPORT DUE DATE],"d"))

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

If above formula still giving you the syntax error, try this:

 

  1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap - worked great! I had to switch the 2 column names around, as I got a #NUM error, but after that, perfect.

Thanks so much! This is my first time using the platform and forum, and am happy that we have people like you to help out us newbies!
1 best response

Accepted Solutions
best response confirmed by Anubis66614 (Copper Contributor)
Solution

@Anubis66614 NETWORKDAYS() function is not supported in SharePoint calculated formulas.

 

You have to use the formula like: 

 

=IF(ISBLANK([1ST PROBATION REPORT RECEIVED DATE]),"",DATEDIF([1ST PROBATION REPORT RECEIVED DATE],[1ST PROBATION REPORT DUE DATE],"d"))

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post