COUNTIF, CHECKBOX with CONTAINS BRANCH "MIL"

JE76
JE76 โœญโœญ

Hello, Please help and thanks in advance.

I am trying to Count all the Key-User cells with a checkbox where the branch is MIL. I have tried the below formula but keep getting #UNPARSEABLE.

Formula I tried is =COUNTIF([Key-User]:[Key-User], =1), CONTAINS ("MIL",@cell,[Branch;Branch])

Also tried =COUNTIF([Key-User]:[Key-User], =1),CONTAINS ("MIL",[Branch:Branch])

Also tried =COUNTIF(Key-User:[Key-User],=1), CONTAINS("MIL",@cell, Branch:Branch)

I am able to get it to count the checkboxes but cannot get it to do the AND CONTAINS.

"Help Me Obi-Wan, you're my only hope."

COUNTIF CHECKBOX and CONTAINS BRANCH CODE.png

Thanks much if you can help.

J

Best Answer

  • KPH
    KPH Community Champion
    edited 12/02/23 Answer โœ“

    Oh no J,

    So close but itโ€™s the first part that is probably causing the problem. Try COUTIFS instead of COUNTIF. That will allow for the 2 criteria. Move the closing parentheses after the =1 to the very end. Then play around with the contains part. Is that a multiselect list? If it isnโ€™t Branch:Branch=โ€œMILโ€ will suffice.

    ย =COUNTIFS([Key-User]:[Key-User], 1,Branch:Branch],โ€MILโ€)

Answers

  • KPH
    KPH Community Champion
    edited 12/02/23 Answer โœ“

    Oh no J,

    So close but itโ€™s the first part that is probably causing the problem. Try COUTIFS instead of COUNTIF. That will allow for the 2 criteria. Move the closing parentheses after the =1 to the very end. Then play around with the contains part. Is that a multiselect list? If it isnโ€™t Branch:Branch=โ€œMILโ€ will suffice.

    ย =COUNTIFS([Key-User]:[Key-User], 1,Branch:Branch],โ€MILโ€)

  • JE76
    JE76 โœญโœญ

    Thanks KPH, That worked perfectly on the first pass. Much appreciated.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!