Need help with formula for individual non-workdays
Hello,
I am using the following formula in my project timeline and which references another sheet which logs any individual non-work dates. This works great in most circumstance:
=IF(OR(COUNTIFS({Sheet - OneStream Non-Working Days Assigned to}, [Assigned To]@row, {Sheet - OneStream Non-Working Days Start Date}, >=[Start Date]@row, {Sheet - OneStream Non-Working Days Range 1}, <=[End Date]@row) > 0, COUNTIFS({Sheet - OneStream Non-Working Days Assigned to}, [Assigned To]@row, {Sheet - OneStream Non-Working Days Start Date}, <=[Start Date]@row, {Sheet - OneStream Non-Working Days Range 1}, >=[End Date]@row) > 0), "Unavailable", "Available")
Using the formula logic, I THOUGHT the results would be as such:
Resource Start Date 10/15/2020 >= Timeline Start Date 10/26/2020 no, so count = 0
Resource End Date 10/30/2020 <= Timeline End Date 10/30/2020 yes, so count = 1
Since Count is greater than 0, the formula proceeds
Resource Start Date 10/15/2020 <= Timeline Start Date 10/26/2020 yes, so count = 1
Resource End Date 10/30/2020 >= Timeline End Date 10/30/2020 yes, so count = 1
Since count is greater than 0, results should be Unavailable. However, I am getting results of zero on everything and ultimately Available which is incorrect. As my timeline has almost a thousand lines, I really need this to be accurate. What am I doing wrong?
Thanks for your help.
Best Answer
-
Try adjusting your logic so that
Timeline End >= Resource Start
and
Timeline Start <= Resource End
This should grab any overlap.
Answers
-
Try adjusting your logic so that
Timeline End >= Resource Start
and
Timeline Start <= Resource End
This should grab any overlap.
-
Thanks@Paul Newcome that did the trick! So simple I suppose, but totally not on my radar. Appreciate your help.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!