Issues with a crossheet Countif formula

Adam F.
Adam F. ✭✭
edited 12/09/19 in Smartsheet Basics

Hi everyone, I'm trying to create a formula to count how many datasets were processed in a month. I've tried the following:

 

=Countif({Datasets},Month(@cell)=12) and I get an Invalid Data Type Error

=Countif({Datasets},ISDATE(@cell)) returns the total of all datasets processed, so I know it's reading correctly as a date...

Any suggestions?

 

Thank you,

Adam

 

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    It is probably because there are empty cells in your range. To compensate for those, you can wrap your MONTH criteria in an IFERROR statement to replace any errors (blank cells) with a number that is not an actual month number. This will give you the ability to essentially ignore any blank cells. Something along the lines of...

     

    =Countif({Datasets},IFERROR(Month(@cell), 0)=12)

     

    If the cell is blank then there is nothing for the MONTH function to look at. That is most likely where your invalid error is coming from.