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
-
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
-
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
-
THANK YOU!!!! Man that was hurting my brain :)
Help Article Resources
Categories
Check out the Formula Handbook template!