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)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
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)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
That WORKED! THANK YOU SO MUCH!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
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!