Validate a column only if another column is not blank - Excel Formula not working
-
08-02-2021 - |
题
I need to add a column validation to my list.
The requirement for the validation is that the column [Body] cant be empty if the column [Status] is one of this statuses: "1-Cancelled" or "2-Awaiting Information from Requester".
I tested the below formula in Excel which is working, but not working in the SharePoint.
=NOT(
AND(
OR(
[Status]="1-Cancelled",[Status]="2-Awaiting Information from Requester"), ISBLANK([Body])
))
Please help me to find the right formula. Thanks in advance
解决方案
Try below formula:
=IF(OR([Status]="1-Cancelled",[Status]="2-Awaiting Information from Requester"),IF(ISBLANK([Body]), false, true), true)
Note:
Sometimes comma(
,
) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;
) instead of comma(,
).Also note that it is not possible to achieve using validation formulas if [Body] is Multiple lines of text field.