Round returned date to working day?
I've been using a formula to calculate due dates, which are always 90 calendar days from the original date column. This is the formula: =IF([Resubmission Required?]@row = "true", [Date Decided (Approved/Rejected)]@row + 90, "n/a")
However, because we are required to calculate these dates in calendar days, many of the dates returned fall on a Saturday or Sunday. Is it possible to write a formula that not only calculates the "technical" due date (+90 calendar days) but will also round the date BACK to the last workday (Friday) if the returned date falls on a weekend? Happy to provide more details if needed.
Best Answer
-
I tried to get fancy with it, and it's possible to calculate using mod(), substitute(), and a variety of other equations, but a simply replacement of the weeknumber with an appropriate negative ends up much simpler.
=IF([Resubmission Required?]@row = "true", [Date Decided (Approved/Rejected)]@row + 90 + IF(weekday([Date Decided (Approved/Rejected)]@row + 90) = 1, -2, IF(weekday([Date Decided (Approved/Rejected)]@row + 90)= 7, -1, 0)) , "n/a")
Answers
-
I tried to get fancy with it, and it's possible to calculate using mod(), substitute(), and a variety of other equations, but a simply replacement of the weeknumber with an appropriate negative ends up much simpler.
=IF([Resubmission Required?]@row = "true", [Date Decided (Approved/Rejected)]@row + 90 + IF(weekday([Date Decided (Approved/Rejected)]@row + 90) = 1, -2, IF(weekday([Date Decided (Approved/Rejected)]@row + 90)= 7, -1, 0)) , "n/a")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 351 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!