If date range includes a Friday - check a box
I have a sheet with a start date and an end date. I would like a checkbox column to be checked if that date range includes a Friday.
Any ideas on how I would do that?
Thank you in advance.
Jennifer
Best Answer
-
Give this a try:
=IF(OR(WEEKDAY([Start Date]@row) = 6, WEEKDAY([End Date]@row) = 6, [End Date]@row > [Start Date]@row + (6 - WEEKDAY([Start Date]@row)) - IF(WEEKDAY([Start Date]@row) < 6, 7, 0) + 7), 1)
Answers
-
@JSpears I have a few ideas, none are elegant. Wondering what the purpose of that is, and if there is an easier way to help solve this.
-
I have a user that needs to be notified if a training is going to take place on a Friday so that she can get front desk coverage. So the Start date is the start date of the training and the End date...well, you get it.
I'm open to any way to be able to get the information - does not have to be a checkbox.
-
Give this a try:
=IF(OR(WEEKDAY([Start Date]@row) = 6, WEEKDAY([End Date]@row) = 6, [End Date]@row > [Start Date]@row + (6 - WEEKDAY([Start Date]@row)) - IF(WEEKDAY([Start Date]@row) < 6, 7, 0) + 7), 1)
-
@Paul Newcome - I'm in awe of your mind. Thank you.
-
Happy to help. 👍️
Honestly... I already had a formula tucked away to grab the "current Monday". A slight tweak to look at [Start Date] instead of TODAY(), another minor tweak to get Friday instead of Monday (change 2 numbers), and then add 7 days to get the following Friday.
Then we say if either the start or end date is a Friday or the End Date is past the start date's Friday then we must have a Friday in there somewhere.
I won't even go into the details of the overcomplicated messes I had tried first. Hahaha
-
Where the first instance of 'Days Not Worked' for a member of staff occurs (the first date of that person's annual leave), I want to input a distinct value (only once) in the column 'Deduct N/A Annual Leave'.
This is the sum of, where manager type is Company annual leave, the number of days in a date ranges between Start/Finish that that fall on any of the selected days in the multiple value dropdown column 'Days Not Worked'.
Please see screenshot of relevant columns. Any help gratefully received, many thanks in advance.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 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