3

So on my calculated formula in share point, I can get it to do what I want it to do with the following formula:

=IF(DATEDIF([Start of Absence],NOW(),"d")<28,"No","Yes")

However it shows yes for dates with no date in it, this does make sense, however I want it to be a "NO" if no date is entered yet, I have tried the following but keep getting errors:

=IF(ISBLANK([Start of Absence]),"No", DATEDIF([Start of Absence],NOW(),"d")<28,"No","Yes"))

I know I am missing something and want to learn, but what is it :).

Thank you in advance.

2 Answers 2

2

I think you're missing an extra IF. Try this:

=IF(IsBlank([Start of Absence]),"No",IF(DATEDIF([Start of Absence],NOW(),"d")<28,"No","Yes"))
1
  • thank you, you are amazing and can now see the logic, for future ones i do :) Commented Jul 10, 2023 at 13:17
0

You can use OR function inside IF function like this:

=IF(OR(ISBLANK([Start of Absence]),DATEDIF([Start of Absence],NOW(),"d")<28) ,"No","Yes"))

Note:

  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].

Official Documentations:

  1. Calculated Field Formulas

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.