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
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 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!