Need help getting a Date which is linked by a predecessor to default to the nearest Thursday
Hello all,
I'm looking to get a date to populate by pulling a predecessor, but default to the nearest Thursday from that date. I have tried several formulas but am not able to get this to work.
To break it down more, I'm looking for the First Guest Check-in Date to be the Thursday after the Contingency End Date see image below.
Answers
-
Try this...
=IF(WEEKDAY([End Date]@row) >= 5, 7-(WEEKDAY([End Date]@row) - 5), (5 - WEEKDAY([End Date]@row))) + [End Date]@row
Explanation:
WEEKDAY( ) returns the number that represents the day of the week:
If the end date falls on a Thursday (5), you want to add 7 days to the end date. On a Friday, add 6 days. On a Saturday, add 5 days.
7-(WEEKDAY([End Date]@row) - 5) + [End Date]&row
End date falling on Thursday through Saturday can be represented as
WEEKDAY([End Date]@row) >= 5
.If the end date falls on Sunday through Wednesday,
(5 - [End Date]@row)
, you want to add the number of days between Thursday and that day to the end date.(5 - [End Date]@row) + [End Date]@ row
Combine these into an IF() function.
If "#INVALID DATA TYPE" bothers you, put the formula into an IFERROR( ) function.
IFERROR( ____ , "Oops! Missing End Date.")
-
If I try to put this formula in the cell it takes away the predecessor. How do I like it so that The Date that shows in Column Start Date Row First Guest Check-in is the Thursday after Column End Date Row Contingency?
It doesn't seem to want to let me use the formula
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!