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
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!