indicate yes/no if date is between dates

I'm trying to incorporate a simple indicator on whether or not a task was completed within the appropriate timeframe. the timeframe is +/- 30 days from the date due column date. I've tried a number of formulas and none of them seem to be working and I can't figure out why. Is it because the earliest/latest dates possible columns are generated by a formula?

Here is my most recent formula attempt:

=IF(AND([Earliest Date Possible (-30 days)]@row<[Date Complete]1,[Latest Date Possible (+30 days)]@row.[Date Complete]1,"Yes", "No")

I did check to make sure all the date columns are "date" properties.

Thanks in advance!

Answers

  • @kbegin It looks like you just have two syntax issues:

    Try this:

    =IF(AND([Earliest Date Possible (-30 days)]@row<[Date Complete]1,[Latest Date Possible (+30 days)]@row>[Date Complete]1),"Yes", "No")

    I added a close parenthesis before "Yes" to close the AND function, and I changed the "." to ">" for your "Latest Date Possible" function.

    You might consider changing the "[Date Complete]1" to "[Date Complete]@row" or to an absolute reference to lock it in place ("$[Date Complete]$1"), depending on what you're using it for.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!