Formula for CountIf One column has a value and another column is not blank

Hello,

I'm reaching out to the community for help with creating two separate sheet summary formulas (see example in image below), to:

  1. Count the "red" values in the "ryg" column ONLY IF the "New Target Finish" column value is NOT blank
  2. Count the number of blank cells in the "New Target Finish" column

Thank you, in advance, for helping me with these formulas. The "blank" values + multiple COUNTIF conditions are stumping me and I keep getting #unparseable errors so far.

--Lisa M

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Lisa Matthews

    Try this

    =COUNTIFS(ryg:ryg, "Red", [New Target Finish]:[New Target Finish], @cell<>"")

    =COUNTIFS([New Target Finish]:[New Target Finish], @cell = "", [Task Name]:[Task Name], @cell <> "")

    For your empty Target Finish count I added your primary column to the formula as a filter - otherwise the formula would find the empty cells all the way down the sheet regardless if you were using the row or not.

    Do these work for you?

    Kelly

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Lisa Matthews

    Try this

    =COUNTIFS(ryg:ryg, "Red", [New Target Finish]:[New Target Finish], @cell<>"")

    =COUNTIFS([New Target Finish]:[New Target Finish], @cell = "", [Task Name]:[Task Name], @cell <> "")

    For your empty Target Finish count I added your primary column to the formula as a filter - otherwise the formula would find the empty cells all the way down the sheet regardless if you were using the row or not.

    Do these work for you?

    Kelly

  • Lisa Matthews
    Lisa Matthews ✭✭✭✭✭

    Hello @Kelly Moore

    These formulas are exactly what I need! I just copied and pasted them directly into the sheet summary field and they work perfectly! Thank you for adding in the condition for the Task Name, it is the right solution. I appreciate your help so much!

    --Lisa

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!