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
- Customer Resources
- 65.5K Get Help
- 447 Global Discussions
- 144 Industry Talk
- 480 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 72 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!