How to make this formula? Count how many rows have dates within a timeframe
I need to calculate how many rows have an APPOINTMENT within 3 days of their DISCHARGE date.
Is there a formula that can get that data? I also need within 7 days as well. I'm a novice at smartsheet formulas. I appreciate your help!
Answers
-
Hi @walcala
I would suggest adding a helper column to start with. I will call it [Within 3 or 7 days]
The formula for this would be
=IF(AND(Appointment@row - Discharge@row <= 7, Appointment@row - Discharge@row > 3), 7, IF(Appointment@row - Discharge@row <= 3, 3, ""))
Then your two further columns
Within 3 days = COUNTIF([Within 3 or 7 days]:[Within 3 or 7 days] = 3)
and
Within 7 days = COUNTIF([Within 3 or 7 days]:[Within 3 or 7 days] = 7)
Hope this helps :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 349 Global Discussions
- 199 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
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!