Formula to COUNTIF with respect to the date column

These two formula are not working - ERROR - #unparseable. The solution I am looking for is to count the no. of MOUs in a calendar year (YTD 2023).

=COUNTIFS({MOU Status}, "Active", {Date of execution}, (@cell >= DATE(2023, 1, 1), @cell <= DATE(2023, 12, 31)))

=COUNTIFS({MOU Status}, "Active", {Date of execution}, >=DATE(2023, 1, 1), {Date of execution}, <=DATE(2023, 12, 31)))

Please help and suggest an alternative solution.

Answers

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭

    Hi @SiddV47,

    You just need to add an AND function to the first formula as you have 2 date criteria:

    =COUNTIFS({MOU Status}, "Active", {Date of execution}, AND(@cell >= DATE(2023, 1, 1), @cell <= DATE(2023, 12, 31)))

    The # unparseable error is being caused as without the AND the 2nd date criteria is being read as a range (which it isn't), lacking any criteria.

    Hope this resolves your issue, but if not let us know!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!