# COUNTIF's and CONTAINS

Options
✭✭

Hi,

I'm trying to create a formula to COUNT specific project type and a particular team name listing on the same reference list. The columns are not co-located, so I'm using 2 separate references. The team name is within a multi-select field (reference {Team} below), and the current formula does not pick up when multiple teams are listed in that reference. I tried to incorporate CONTAINS or do multiple COUNTIF statements but keep getting a #ERROR or #UNPARESABLE message in my formula. What am I missing?

Formula leverage

= COUNTIFS({Project Category}, [Primary Column]@row, {Team}, [Primary Column]1)

• ✭✭✭✭✭✭
Options

Hey @Liv_24_7

Does this work for you

= COUNTIFS({Project Category}, [Primary Column]@row, {Team}, CONTAINS([Primary Column]1, @cell))

If this formula does not work for you, please provide the community with screenshots so we can see how your data is being collected on your sheets. It is a bit confusing without the pictures to understand how data from a single column is being used as a reference in two seemingly very different fields. If the #Errors continue, it is also helpful to know exactly what #error you received.

Kelly

• ✭✭✭✭✭✭
Options

Hey @Liv_24_7

Does this work for you

= COUNTIFS({Project Category}, [Primary Column]@row, {Team}, CONTAINS([Primary Column]1, @cell))

If this formula does not work for you, please provide the community with screenshots so we can see how your data is being collected on your sheets. It is a bit confusing without the pictures to understand how data from a single column is being used as a reference in two seemingly very different fields. If the #Errors continue, it is also helpful to know exactly what #error you received.

Kelly

• ✭✭
Options

Thank you so much @Kelly Moore that worked! I was missing the @cell piece to the CONTAINS logic.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!