IF OR() in SharePoint Calculated Column
To use IF OR function in SharePoint Calculated Column, you should use the below formula syntax:
= IF(OR(Condition1,Condition2,....),TRUE,FALSE)
To apply the above IF OR syntax in your SharePoint Calculated Column, it should be
=IF(OR([Course1 Expiration Date]<=TODAY(),[Course2 Expiration Date]<=TODAY()),"Valid","Expired")
In this case, the SharePoint Calculated Column formula will only show the "Expired
" value if the first date and second date are equal or greater than Today()
as shown below.
But I don't think this SharePoint Calculated Column formula will meet your requirements where you need to show "Expired
" if one of the dates columns is equal or greater than Today()
! So in this case, you should use IF AND() instead of IF OR() to get the correct expected output.
IF AND() in SharePoint Calculated Column
To use IF AND function in SharePoint Calculated Column, you should use the below formula syntax:
= IF(AND(Condition1,Condition2,....),TRUE,FALSE)
To apply the above IF AND() syntax in your SharePoint Calculated Column, it should be
=IF(AND([Course1 Expiration Date]<=TODAY(),[Course2 Expiration Date]<=TODAY()),"Valid","Expired")
In this case, the SharePoint Calculated Column formula will show the "Expired
" value if one of the date columns is equal or greater than Today()
otherwise it will show "Valid
" as shown below.
The expected result for IF(OR()) and if(AND())
Below is a comparison between the expected result for IF(OR()) and IF(AND()) in SharePoint Calculated Column.
Note: The Today() function will not preserve the first saved [Today] value, and it will be recalculated with the current date when the item is updated! Learn more at Supported and Unsupported Columns In SharePoint Calculated Column Formula