Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

CountIFs Ignoring Blanks

Good Morning,

I am trying to get this formula to work however I'm getting an Invalid Data type probably because in some instances there's a date but the duration hasn't been calculated yet. Essentially i would need it to ignore the cells that are blank in the duration column. Here's what I have:


=COUNTIFS([Date Received at Svc Center]:[Date Received at Svc Center], MONTH(@cell) = 12, (Duration:Duration), <=3)

Best Answer

  • Community Champion
    Answer ✓

    Blanks don't matter to countifs. Is your date received at svc center column set to be date type? If so, do you have any data in that column that isn't a date? Running the month formula on text will pop an error, just wrap it in an iferror.


    =COUNTIFS([Date Received at Svc Center]:[Date Received at Svc Center], iferror(MONTH(@cell),0) = 12, Duration:Duration, <=3

Answers

  • Community Champion
    Answer ✓

    Blanks don't matter to countifs. Is your date received at svc center column set to be date type? If so, do you have any data in that column that isn't a date? Running the month formula on text will pop an error, just wrap it in an iferror.


    =COUNTIFS([Date Received at Svc Center]:[Date Received at Svc Center], iferror(MONTH(@cell),0) = 12, Duration:Duration, <=3

  • ✭✭✭

    Thank you very much for your help, wrapping that Month formula in the IFERROR did the trick!!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions