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!
-
Help Article Resources
Categories
Check out the Formula Handbook template!