COUNTIF using OR

Options
✭✭✭✭✭✭

Hi,

I'm trying to count how many check boxes (out of a possible 4) are checked on a row (basically, countif w OR x OR y OR z is checked).

I've tried many variations of the following formula:

=COUNTIFS(OR[PNS]@row = "1", [EIP]@row = "1"))

Thank you!

Tags:

• ✭✭✭✭✭✭
Options

If your column title contains a space, it must be surrounded with square brackets. This should fix it.

=COUNTIFS(PNS@row, 1) + COUNTIFS(EIP@row, 1) + COUNTIFS(Facilities@row, 1) + COUNTIFS([Patient Care Experience]@row, 1)

• ✭✭✭✭✭✭
Options

Are the wxyz column grouped together? If so, this should work:

=COUNTIFS(w@row:z@row, 1)

• ✭✭✭✭✭✭
Options

Unfortunately, the columns are not grouped together and I am unable to rearrange them :(

• ✭✭✭✭✭✭
edited 08/24/23
Options

A little longer, but it will still work fine.

=COUNTIFS(w@row, 1) + COUNTIFS(x@row, 1) + COUNTIFS(y@row, 1) + COUNTIFS(z@row, 1)

Edit: Technically, you could use COUNTIF instead of COUNTIFS since it is only comparing one item. I just always use COUNTIFS for the sake of consistency.

• ✭✭✭✭✭✭
Options

I'm getting an error with this formula (which replaces the w/x/y/z with the actual column names):

=COUNTIFS(PNS@row, 1) + COUNTIFS(EIP@row, 1) + COUNTIFS(Facilities@row, 1) + COUNTIFS(Patient Care Experience@row, 1)

• ✭✭✭✭✭✭
Options

If your column title contains a space, it must be surrounded with square brackets. This should fix it.

=COUNTIFS(PNS@row, 1) + COUNTIFS(EIP@row, 1) + COUNTIFS(Facilities@row, 1) + COUNTIFS([Patient Care Experience]@row, 1)

• ✭✭✭✭✭✭
Options

Thanks for the reminder on that. It all works now. Thanks for your assistance!!

• ✭✭✭✭✭✭
Options

Awesome, I'm glad it worked for you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!