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
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!