1

This is the first time asking here. I'm trying to write a formula for list validation but I cannot understand what I'm missing.

For this formula I need to chain 2 conditions

  1. [Start date]<= [End Date] (both columns are date columns)
  2. AND(ISBLANK([End Date]), [Status] = "Disabled)

Basically the [End Date] column value should be greater than [Start date] on one hand and on the other the [End date] column must not be empty while the [Status] column's value is "Disabled" ([Status] is a choice with 2 options column).

I came up with the following but apparently there's something wrong with the syntax:

=IF(AND([Start Date]<=[End Date],IF(AND(ISBLANK([End Date]), [Status]="Disabled")FALSE,TRUE)FALSE,TRUE)

I've checked MS documentation and according to it the formula above should work:

https://support.microsoft.com/en-us/office/is-functions-586532cc-9888-4ca0-98b8-c874e4c8a087?ui=en-us&rs=en-us&ad=us https://support.microsoft.com/en-us/office/and-function-9ca21054-a466-477e-98bf-fc79e62afb3c https://support.microsoft.com/en-us/office/if-function-7025be14-5665-43d0-af20-8293d1fe9d3a

Can you please help me figure this out?

I'm doing this in SharePoint Online.

1 Answer 1

0

Try using this formula in List Validation settings formula:

=IF(AND([Status]="Disabled",ISBLANK([End Date])),FALSE,IF([End Date]<[Start Date],FALSE,TRUE))

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

Similar threads:

  1. Two formulas in validation settings
  2. List validation to make multiple fields mandatory if dropdown meets condition

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.