If Count is Zero leave blank or --

I have a formula that takes information from different sheets and outputs a count. I would like to replace and fields with a 0 count with a double dash (--). I got the formula working for fields that have a Zero, but when I use the same formula in a field with another number (Ex. 1, 12, 13, etc) it leaves the field blank instead of the number greater than zero. Below is the formula I'm using:


=IF(COUNTIFS({DGB HC Tracker (Master) Range 1}, "Mobile", {DGB HC Tracker (Master) Range 2}, "Digital Group Services") = 0, "--")


What am I missing or doing wrong? Thanks!

Answers

  • David Tutwiler
    David Tutwiler Overachievers Alumni

    You're only solving the True part of the IF statement. You're saying essentially "If the COUNT is 0 then write "--" but you aren't telling the formula what do to if it's not 0. I think this will work.

    =IF(COUNTIFS({DGB HC Tracker (Master) Range 1}, "Mobile", {DGB HC Tracker (Master) Range 2}, "Digital Group Services") = 0, "--", COUNTIFS({DGB HC Tracker (Master) Range 1}, "Mobile", {DGB HC Tracker (Master) Range 2}, "Digital Group Services"))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!