COUNTIF Function Within Date Range
Hello,
I am trying to write a COUNTIFS formula that would pull within a certain date range. Right now, the criteria would be to pull from a specific Project Reach and then an expiration between 1/1/2021 and 1/31/2021. The formula I have right now is not producing a count, so I'm doing something wrong:
=COUNTIFS({S2G Master ROE Data Range 1}, "=PORT ARTHUR", {S2G Master ROE Data Range 7}, ">=01/01/2021", {S2G Master ROE Data Range 7}, "<=01/31/2021")
Any suggestions for how to fix this? I'd like to replicate it for each month so we can forecast upcoming expirations.
Thank you!
Best Answer
-
Try this...
=COUNTIFS({S2G Master ROE Data Range 1}, "PORT ARTHUR", {S2G Master ROE Data Range 7}, >= DATE(2021, 01, 01), {S2G Master ROE Data Range 7}, <= DATE(2021, 12, 31))
Another option would be to just search on the year...
=COUNTIFS({S2G Master ROE Data Range 1}, "PORT ARTHUR", {S2G Master ROE Data Range 7}, IFERROR(YEAR(@cell), 0) = 2021)
Answers
-
Try this...
=COUNTIFS({S2G Master ROE Data Range 1}, "PORT ARTHUR", {S2G Master ROE Data Range 7}, >= DATE(2021, 01, 01), {S2G Master ROE Data Range 7}, <= DATE(2021, 12, 31))
Another option would be to just search on the year...
=COUNTIFS({S2G Master ROE Data Range 1}, "PORT ARTHUR", {S2G Master ROE Data Range 7}, IFERROR(YEAR(@cell), 0) = 2021)
-
That WORKED! THANK YOU SO MUCH!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!