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!

Vishnu S
  • 864
  • 1
  • 14
  • 25
Ben
  • 13
  • 1
  • 3

2 Answers2

0

Have you tried

=IF(ISBLANK([Action Closed]), "", DATEDIF([ColumnDate1],[ColumnDate2],"d"))
Billy P
  • 236
  • 2
  • 11
0

Try this,

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