Countifs with Date Range
Hi! I have a number of columns with dates and need to count rows within a date range, i.e., products sold between January 1, 2021 and March 31, 2021. How do I write the formula to recognize the date range?
Best Answer
-
Hi Desiree,
Try this:
=COUNTIFS(Date:Date, @cell >= DATE(2021, 1, 1), Date:Date, @cell <= DATE(2021, 3, 31))
The dates are listed in (YYYY, M, D) format, so if you want to switch the dates for the range to 4/1 through 6/30, you'd do (2021, 4, 1) and (2021, 6, 30).
Hope this helps! Let me know if it works.
Best,
Heather
Answers
-
Hi Desiree,
Try this:
=COUNTIFS(Date:Date, @cell >= DATE(2021, 1, 1), Date:Date, @cell <= DATE(2021, 3, 31))
The dates are listed in (YYYY, M, D) format, so if you want to switch the dates for the range to 4/1 through 6/30, you'd do (2021, 4, 1) and (2021, 6, 30).
Hope this helps! Let me know if it works.
Best,
Heather
-
You are awesome, Heather! Thank you so much.
-
Happy to help!
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!