Hey besties! Today, I’m going to share with you a brilliant trick for counting checkbox cells in Google Sheets. You know, that handy feature that allows you to keep track of all your completed tasks. I’m going to show you how to use the COUNTIF function to accomplish this task in no time. So get ready to be amazed!
Counting Checkbox Cells in Google Sheets
Counting checkbox cells in Google Sheets is super simple using the COUNTIF function. Here’s the syntax and a step-by-step example to see it in action:
Syntax
=COUNTIF(range, TRUE)
Where:
range
is where the checkbox cells are located.
It’s as simple as that! Let’s see why through our example below.
Example
Step 1: Add the checkbox cells
Select the range, then click on Insert in the main toolbar and choose Checkbox. Check out our complete tutorial on adding a checkbox cell here.
Step 2: Check the cells
By checking a cell, the cell’s value becomes TRUE, while leaving it unchecked makes the value FALSE. This value can be easily accessed by formulas in other cells.
Step 3: Add the formula =COUNTIF(range, TRUE)
Add the formula in another cell, defining the range. For our example, it is stored in C2:C10, so we use the formula =COUNTIF(C2:C10, TRUE)
. Once you press Enter, you will see the number of checked checkbox cells in your range.
FAQs
Can I count unchecked or empty checkbox cells in Google Sheets?
Yes! Sometimes, you need to tally the empty cells instead of the checked cells. The solution is simple. The formula syntax is as follows:
=COUNTIF(range, FALSE)
Where:
range
is where the cells are located.
The empty cells have a FALSE value, which can also be accessed by the formulas you add.
Can I assign custom values to the checkbox cells?
Yes! It is possible to assign custom values instead of the default TRUE value for checked cells and FALSE (0) for unchecked cells. For example, you can set “closed” for TRUE and “open” for FALSE.
Syntax
- Checked cells:
=COUNTIF(range, value_if_true)
Where:
-
range
is where the cells are located. -
value_if_true
is the value you set if it is checked. -
Unchecked cells:
=COUNTIF(range, value_if_false)
Where:
range
is where the cells are located.value_if_false
is the value you set if it is unchecked or not checked.
Assigning custom values to checkbox cells:
Step 1: Add the checkbox cell.
Step 2: Select your range, then click on Data -> Data Validation.
Step 3: Choose Checkbox in the criteria and check the Use custom values box.
Step 4: Set the values for the checked and unchecked cells. Click Save.
Step 5: Check the cells.
Step 6: Add the formula using the syntax =COUNTIF(range, value_if_true)
.
Follow the syntax, setting the range and value based on what you want to count.
Can I count all instances of checkbox cells in my sheet?
No. What the formula can indirectly detect, through the defined criterion, is whether you have checked or not, but it cannot differentiate if the cell contains a checkbox or not.
If you try to count the entire sheet as a range for checked and unchecked cells, those cells that don’t contain the right data to count will be simply ignored by the function.
Use our expiration reminder software to easily set up custom reminders from your spreadsheet with just a few clicks.
If you enjoyed this article, you might also like our article on how to count unique values in Google Sheets or our article on how to count cells containing specific text in Google Sheets.
If you want to learn how to send emails based on dates in Google Sheets, we also recommend checking out our detailed guide.
Now you have all the keys to count checkbox cells in Google Sheets like a pro! Feel free to share this trick with your friends and check out Crawlan.com for even more Google Sheets tips and tricks.
See you soon, besties!✨