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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67K Get Help
- 441 Global Discussions
- 154 Industry Talk
- 502 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 79 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!