# formula help

✭✭✭✭
edited 08/05/21

I have 2 columns i'm trying to count information one is drop down where I need to count rows where a checkbox is checked. I have the formula to find the locations in the columns which works by itself. However; I'm having trouble how to add to count the rows where a checkbox is checked that has either of the location listed in the drop down. The check box column is called "physician leadership" this is for a sheet summary. how do i add additional formula(and what is it) to get the formula to count the checked boxes.

=COUNTIF(Location:Location, OR(CONTAINS("Brock", @cell), CONTAINS("Princess Anne", @cell)))

i've tried to use AND(physician leadership: physician leadership,1) but keep getting error.

thanks!

• ✭✭✭✭✭✭

You need to use the COUNTIFS function (with the S on the end) to be able to use multiple range/criteria sets.

=COUNTIFS(Location:Location, OR(CONTAINS("Brock", @cell), CONTAINS("Princess Anne", @cell)), [physician leadership]:[physician leadership], @cell = 1)

• ✭✭✭✭✭✭

You need to use the COUNTIFS function (with the S on the end) to be able to use multiple range/criteria sets.

=COUNTIFS(Location:Location, OR(CONTAINS("Brock", @cell), CONTAINS("Princess Anne", @cell)), [physician leadership]:[physician leadership], @cell = 1)

• ✭✭✭✭

@Paul Newcome Thank you so much I tried so many variations I go lost in my own head lol.. worked perfectly thank you so much!

• ✭✭✭✭✭✭

I've done the same thing plenty of times. Haha.

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!