countif with date range
Hi all. I am trying to count the number of line items in March 2022. This is my equation.
=COUNTIF([Planned Pull Date]:[Planned Pull Date], >=DATE(2022, 3, 1), <=DATE(2022, 3, 31))
It comes up is incorrect argument set. What am I doing wrong?
Best Answers
-
You're close! You can use AND to consider two (or more) criteria for the same range.
=COUNTIF([Planned Pull Date]:[Planned Pull Date], AND(@cell >=DATE(2022, 3, 1), @cell <=DATE(2022, 3, 31)))
Alternatively, you can use YEAR and MONTH:
=COUNTIF([Planned Pull Date]:[Planned Pull Date], AND(YEAR(@cell) = 2022, MONTH(@cell) = 3))
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
You are a genius! Thank you so much @Jeff Reisman
Answers
-
You're close! You can use AND to consider two (or more) criteria for the same range.
=COUNTIF([Planned Pull Date]:[Planned Pull Date], AND(@cell >=DATE(2022, 3, 1), @cell <=DATE(2022, 3, 31)))
Alternatively, you can use YEAR and MONTH:
=COUNTIF([Planned Pull Date]:[Planned Pull Date], AND(YEAR(@cell) = 2022, MONTH(@cell) = 3))
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
You are a genius! Thank you so much @Jeff Reisman
-
If only my teenage kids recognized that, LOL.
Happy I could help!
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Help Article Resources
Categories
Check out the Formula Handbook template!