Quick question about creating an IFERROR statement after an OR statement

Hey everyone,

Hopefully this is an easy question, though I'm having a hard time figuring this out! I'm trying to write a COUNTIFS statement that can be broken down into quarterly segments. I learned that an OR statement would allow me to include multiple months in the statement, but now I don't know how to properly include IFERROR(YEAR(@cell),0)=2022. I added it to the end of the below statement and got an error. Could someone help me finish this statement off so I can include the year? I'm still learning..

=COUNTIFS([End Date]:[End Date], OR(IFERROR(MONTH(@cell), 0) = 1, IFERROR(MONTH(@cell), 0) = 2, IFERROR(MONTH(@cell), 0) = 3))

Thank you so much!

Tags:

Answers

  • Kelly Drake
    Kelly Drake Overachievers Alumni

    So you can't have multiple conditions on the same range in COUNTIFS - you would need to do three COUNTIFS and add them together and IIRC, IFERROR is not able to be inside a COUNTIF. The COUNTIF wouldn't count the errors as those wouldn't match the conditions you would be using

    Try this:

    =COUNTIF([End Date]:[End Date], MONTH(@cell) = 1)+COUNTIF([End Date]:[End Date], MONTH(@cell) = 2)+COUNTIF([End Date]:[End Date], MONTH(@cell) = 3)

    Kelly Drake (she/her/hers)

    STARBUCKS COFFEE COMPANY| business optimization product manager

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!