How do I count the number within a range of days
I am trying to track a hotel list and find out how many people need hotel rooms on each day over a two month period. I have the travel days. How would I easily pull a report of that?
Ex:
19th - 1
20th - 2
21st - 2
22nd - 1
Etc
Answers
-
You could use a COUNTIFS function with your two criteria as on or after the arrival date and before or on the departure date. The formula would look something like this:
=COUNTIFS([Arrival]:[Arrival], >=DATE(2024, 01, 01), [Departure]:[Departure], <=DATE(2024, 01, 31))
You can enter the dates into the formula as above, or reference a cell that holds the date.
=COUNTIFS([Arrival]:[Arrival], >=Arrival@row, [Departure]:[Departure], <=Departure@row)
or
=COUNTIFS([Arrival]:[Arrival], >=Arrival1, [Departure]:[Departure], <=Departure1)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!