1

I'm using SharePoint 2010. Right now I have a calculated column which displays in days the difference between ColumnDate1 and ColumnDate2 as follows:

=DATEDIF([ColumnDate1],[ColumnDate2],"d")

But sometimes I get an error "#NUM!" when ColumnDate1 is greater than ColumnDate2.

How do I do the following for the same calculated field:

1- Display "NO DATA" when EITHER columns is blank OTHERWISE provide number of days.

2- Display "NOT LATE" when Date1 is greater than Date2, OTHERWISE provide number of days.

Thank you for your help!

0

Try this,

=IF(OR(ISBLANK([DATE1]),ISBLANK([DATE2])),"NO DATA",IF(ISERROR(DATEDIF([DATE1],[DATE2],”d”)),”NOT LATE”,DATEDIF([DATE1],[DATE2],”d”)))
  • 1
    Thank you so much. You saved my day. I really appreciate it. It works great!!! – Ben May 31 '18 at 2:53
0

Have you tried

=IF(ISBLANK([Action Closed]), "", DATEDIF([ColumnDate1],[ColumnDate2],"d"))

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.