# Complex COUNTIFS and IF Function

Options

Hello,

I need help putting together a function that can count certain cells in my grid. The inputs of the function are the following:

• If Beta is "Yes", it should be counted twice
• If Beta is "No", it should be counted once
• But if the Primary Region Column is not checked, the row should not be counted at all.

Beta is a column with only yes or no selectable answers, Primary Region is another column that is a checkbox.

I need the total sum of how this is added up after these inputs are accounted for, is this doable?

Tags:

• ✭✭✭✭✭✭
Options

Try something like this...

=COUNTIFS(Beta:Beta, "Yes", [Primary Region]:[Primary Region], 1) * 2 + COUNTIFS(Beta:Beta, "No", [Primary Region]:[Primary Region], 1)

• Options

Hey Paul,

Thank you, I understand the logic of this function and it seems like it should work, but I am getting an "#UNPARSEABLE" error, is there something we could be missing?

This function is living in a Sheet Summary field, is that an issue?

• ✭✭✭✭✭✭
Options

Can you copy/paste the formula directly from the sheet?

Depending on your region, you may also need to swap out the commas for semi-colons.

=COUNTIFS(Beta:Beta; "Yes"; [Primary Region]:[Primary Region]; 1) * 2 + COUNTIFS(Beta:Beta; "No"; [Primary Region]:[Primary Region]; 1)

Also double check to make sure the column names are correct.

• edited 06/04/20
Options

No luck with commas or semi-colons, on my sheet Beta is actually called "Regional Beta Platform Created", but I've been updating your formulas accordingly.

I am also in the US, is there a way we can get on the phone?

• Options

That worked! Thank you!!!

• ✭✭✭✭✭✭
Options

Happy to help! 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!