How to count date occurrences within a month

Options

I have a sheet that identifies the date of new survey submissions and the date of responses. I am looking to count the dates that occur within specific months/years for a report... Here is what I am using, which is currently giving me a response of 0, though I know there are multiple occurrences for September.

The ranges are in date columns.

=COUNTIFS({*MASTER TABLE* Range 4}, "MONTH(@cell)" = 9)

I have also tried =COUNTIFS({*MASTER TABLE* Range 4}, "MONTH(@cell)" = 09)


Any Ideas?

Tags:

Best Answer

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Merritt R,

    The criteria should not be in the quotation marks as this will mean the COUNTIFS is looking for that as text, rather than as a function.

    However, checking this you'll get an error. You can get round this easily though:

    =COUNTIFS({*MASTER TABLE* Range 4},<>"",{*MASTER TABLE* Range 4}, MONTH(@cell) = 9)

    Since your relevant values will have both a month of 9 (for September) and not be blank.

    Hope this helps, but any problems/questions just ask! 🙂

Answers

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Merritt R,

    The criteria should not be in the quotation marks as this will mean the COUNTIFS is looking for that as text, rather than as a function.

    However, checking this you'll get an error. You can get round this easily though:

    =COUNTIFS({*MASTER TABLE* Range 4},<>"",{*MASTER TABLE* Range 4}, MONTH(@cell) = 9)

    Since your relevant values will have both a month of 9 (for September) and not be blank.

    Hope this helps, but any problems/questions just ask! 🙂

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!