Checkbox for consecutive dates (3 or more days and 2 or less)
Hi! I have a form that is used to track days a store location is closed. Everytime a store closes, the manager submits a form entry with the location name and the date of the closure. I would like to track consecutive closures for 2 days or less and 3 days or more. For example, Asheville, NC should be checked for 10/18-10/26. Any help would be amazing!
Best Answer
-
Try something like this…
2 Days or Less:
=IF(COUNTIFS([Clinic Name]:[Clinic Name], @cell = [Clinic Name]@row, [Date of Closure]:[Date of Closure], AND(@cell >= [Date of Closure]@row - 1, @cell <= [Date of Closure]@row + 1)) <= 2, 1)
3 Days or More:
=IF([2 Days or Less]@row <> 1, 1)
Answers
-
Hey,
I would use two formulas for that and store the results in different sheet or in Sheet Summary.
a) countif
=countif([Clinic Name][Clinic Name], "Asheville, NC") - the result of this formula will be 9 and you can keep it in the sheetsummary field called lets' say City1
b) if (for the columns with checkboxes)
=if(City1< = 2, 1, 0)
=if (City1 > = 3, 1, 0)
Let me know if that works.
The Real Smartsheet Enthusiast
Is there anything else we can help you with? - book your time!
MASA Consult - Your Aligned Smartsheet Partner
Find us on LinkedIn!
-
@kowal Thank you! The only issue is I want it to be automated. I want it to search for the Clinic Name@Row in the Clinic Name column and then count if they have Date of Closures within the 2 or less and 3 or more time frames.
-
Try something like this…
2 Days or Less:
=IF(COUNTIFS([Clinic Name]:[Clinic Name], @cell = [Clinic Name]@row, [Date of Closure]:[Date of Closure], AND(@cell >= [Date of Closure]@row - 1, @cell <= [Date of Closure]@row + 1)) <= 2, 1)
3 Days or More:
=IF([2 Days or Less]@row <> 1, 1)
-
PaulNewcome Any idea why it wouldn't have checked random days that fall within the first or last dates? I attached an image of the Asheville, NC closures
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
- 142 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!