Counting Checkmarks within a Column
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.
Comments
-
Try setting something up with Sumifs... A screenshot of your spreadsheet would be more helpful.
=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.
-
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.
-
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
instead of
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
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!