0

I have a calculated column which is not working as intended. There is an 'if' condition which checks the value from a date column called 'Modified' and it sets the calculated column to 90 days after the 'Modified' column.

When I wrap that if statement in an 'OR' function which will only set that date if a 'Status' (choice) column is not equal to certain values; this causes it to only hit the first condition, never the second.

Here is my equation:

=IF(OR(Status<>"Closed",Status<>"On Hold",Status<>"Pending Closure"),Modified+90,"No Due Date")

If I switch 'Modified+90' and 'No Due Date', all fields will be set to 'No Due Date' so I know that both conditions are viable it's just the 'OR' logic which is failing to ever hit the second condition.

I know the following logic works: =IF(Status<>"Closed",Updated+90,"No due date") but this doesn't allow for multiple 'Status' column values.

Here is an image of the 'Status' values & the calculated column values side-by-side:

Status Column: enter image description here Calculated Column :enter image description here

The first 3 should result in 'No Due Date' and the 4th should show the value in that column.

Any guidance would be appreciated!!

1 Answer 1

1

Change it to AND instead of OR

I'd recommend reviewing this knowledgebase article. The examples at the bottom provide a clear indication of what your result will be: https://support.microsoft.com/en-us/office/or-function-9a2a1cca-696f-4d19-a959-3943babd076f

Your original formula was basically staying if any of the specified conditions are met, set the value to Date Modified + 90 days. If none of the conditions are met, set it to "No due date".

At least two of your conditions were always going to be met because you had three conditions that were checking that they were not equal to a specific value.

The new formula is saying that all three conditions must be met to set Date Modified + 90 days and if any of them are not met, set it to "No due date"

2
  • Wow, that seems to have worked. Would you explain why that is the case? I would have assumed it would be interpreted like: If (status not A OR status not B OR status not C) do "thing 1" else, do "thing 2" It seems like that's not how it works though?
    – Abraxas
    Aug 3, 2022 at 23:37
  • Awesome, thank you for the clarification!
    – Abraxas
    Aug 4, 2022 at 0:02

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.