I’m trying to create validation that would check a date the user has added and make sure that it is either the current month or next month.
For instance, today is Oct 29, so a person could add a calendar event for 10/30 or 11/29, but not for 12/29.
The following formula works in Excel, but not when I use it as validation on the column.
=IFERROR(OR(DATEDIF(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(1)),[DateToCheck],”M”) = 0,DATEDIF(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(1)),[DateToCheck],”M”)=1), FALSE)
Any recommendations?
IFERROR and OR are probably not valid functions/keywords. ISERROR is a valid one. You may want to use nested IF instead of OR.
https://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx