Date between dates to return the date in cell

Hello,

I am struggling with one of my formulas:

=IF(AND([Start Date]@row, >=DATE(2020, 10, 1), [Start Date]@row, <=DATE(2021, 9, 30)), [Start Date]@row, IF(AND([End Date]@row, >=DATE(2020, 10, 1), [End Date]@row, <=DATE(2021, 9, 30)), [End Date]@row))

If the start or end date falls between the dates in the AND statement, I want it to return the date in either cell. When I use my formula I get an "invalid data type" error. I haven't made it to the if it doesn't meet those criteria portion, but I want it to leave the cell blank. I'm sure it's something minor I'm missing. Thank you in advance for helping! I hope this makes sense, just trying to parse out my dates in FY columns for each project row.

Tracy

Best Answer

  • DKazatsky2
    DKazatsky2 Community Champion
    Answer ✓

    Hi @tracywalpole,

    The syntax inside your AND section is off, try the following.

    =IF(AND([Start Date]@row >= DATE(2020, 10, 1), [Start Date]@row <= DATE(2021, 9, 30)), [Start Date]@row, IF(AND([End Date]@row >= DATE(2020, 10, 1), [End Date]@row <= DATE(2021, 9, 30)), [End Date]@row))

    Hope this helps,

    Dave

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!