Year and Month

Options

Hello, could someone please assist me with this formula? I calculate the number of 'improvements' each month but as we have gone into a new financial year it's calculating June 2021 and June 2022 (and so on)- how do I add a 'year' function to this?


=COUNTIFS({IMS005.04 Improvement Request and Non-Conf Range 2}, "Improvement", {IMS005.04 Improvement Request and Non-Conf Range 1}, IFERROR(MONTH(@cell), 0) = 7)

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Options

    Hey @Melanie Paff

    I added the YEAR function to the COUNTIFS. Instead of hard coding the value in (you can if you wish), I made it equal to the current year using the TODAY() function.

    =COUNTIFS({IMS005.04 Improvement Request and Non-Conf Range 2}, "Improvement", {IMS005.04 Improvement Request and Non-Conf Range 1}, IFERROR(MONTH(@cell), 0) = 7,{IMS005.04 Improvement Request and Non-Conf Range 1}, IFERROR(YEAR(@cell), 0) =YEAR(TODAY()))

    Will this work for you?

    Kelly

  • Melanie Paff
    Options

    Thanks Kelly, thats helpful. Do you mind letting me know how to hard code the year as I need to show a rolling average so the data spans multiple years?

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!