# Counting Checkmarks within a Column

Options
✭✭
edited 12/09/19

I have a bunch of products, each listing a different product. Each row has a different client, with their contracted products. I want to have a sum of each prodcut at the top, but the columns are checkboxes. So I'm trying to do a formula that says Count if the the box is checked, so I can know how any products are sold.

Tags:

• ✭✭✭✭✭✭
Options

=sumifs([Price Column header Title ]:[Price Column Header Title], [Checkbox Column Title]:[Checbox Column Title],1)

I added a screenshot of a sample of this working.

https://help.smartsheet.com/function/sumifs

• ✭✭✭✭✭✭
Options

In smartsheet there are 3 ways to reference a binary such as a checkbox.

You can reference them as true or false

if(checkbox1 = true,1,0)

you can reference them as 1 or 0

if(checkbox1 = 1,1,0)

or you can simply reference the cell

if(checkbox1,1,0)

The last one is somewhat unstable and not recommended for use, but the first 2 are both equal. One thing to note is that there are no quotations around the true in the first statement. This is on purpose, though it seems the program will work even if you put them there.

• ✭✭✭✭✭✭
Options

re: The last one is somewhat unstable and not recommended for use

Why?

I would use that before either of the other two.

I use

checkbox@row

if(something the returns a Boolean, 1, 0)

when the output is a Boolean.

....

If you want to use the Checkbox type column for non-zero, non-one values, (such as the sum of the checked boxes in a range), you can force the result to text

=COUNTIFS(CHILDREN(), 1) + ""

Checkbox type columns can only contain 0, 1, or text.

Elsewhere, you can convert this number back to a value

=VALUE(cell ref)

Craig

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!