How to sum / count checked checkboxes in Excel?
Checkboxes in Excel serve as a practical tool for tracking the status of your data. Imagine you're working with a list that includes checkboxes—some checked and some not. You might find yourself needing to count the number of checkboxes that are checked or calculate the sum of values associated with those checked checkboxes.
Sum or count checked checkboxes in Excel
Sum or count checked checkboxes in Excel
In Excel, there isn't a straightforward formula to count or sum the checked checkboxes directly. To address this issue effectively, please follow these steps:
Step 1: Link Checkboxes to Cells
- Open your worksheet which you want to count or sum the checked checkboxes, then right click one checkbox, and choose Format Control, see screenshot:
- In the Format Object dialog box, under the Control tab, click to select a blank cell which relative to your selected checkbox as the link cell from the Cell link option, and don’t change any other options, and then, click OK button. See screenshot:
- Then, a TRUE displayed at the selected cell if the checkbox is check, and a blank cell if the checkbox is unchecked.
- And then, you need to repeat above steps to set a link cell for each checkbox of the column, and had better link the cell with the corresponding checkbox in the same row, you will get the following screenshot:
VBA code: link multiple checkboxes to cells at once
Sub LinkChecks()
'Update by Extendoffice
Dim xCB
Dim xCChar
i = 2
xCChar = "D"
For Each xCB In ActiveSheet.CheckBoxes
If xCB.Value = 1 Then
Cells(i, xCChar).Value = True
Else
Cells(i, xCChar).Value = False
End If
xCB.LinkedCell = Cells(i, xCChar).Address
i = i + 1
Next xCB
End Sub
Step 2: Apply formulas to calculate the checkboxes
After finishing setting the link cell for each checkbox, you can use the below formulas to calculate the checkboxes:
Count the checked checkbox:
=COUNTIF(D2:D15,TRUE)
Sum the cell values based on checked checkbox:
=SUMIF(D2:D15, TRUE, C2:C15)
Counting or summing checked checkboxes in Excel is straightforward once you link them to cells. With these steps, you're well on your way to leveraging Excel's powerful data management capabilities. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials, please click here to access them. Thank you for reading, and we look forward to providing you with more helpful information in the future!
Effortlessly insert multiple checkboxes across your selected range with Kutools for Excel!
Kutools for Excel's Batch Insert Check Boxes feature allows you to add checkboxes in bulk with just a few clicks. Say goodbye to the tedious task of inserting checkboxes one by one and welcome a more efficient way to organize your data. Get it now to start your free trial for 30 days!Demo: Sum or count checked checkboxes in Excel
Related Articles:
- Excel Checkboxes: Add, select, delete and use checkboxes in Excel
- A checkbox is an interactive tool which is used to select or deselect an option, you will often see them on web forms or when filling in surveys. In Excel, you can add manifold possibilities by checking or unchecking a checkbox which makes your sheet more dynamic and interactive, such as creating checklists by checkboxes, inserting a dynamic chart by checkboxes, etc.
- Insert multiple checkboxes in Excel
- How can we quickly insert multiple check boxes in Excel? Please follow these tricky methods in Excel.
- Create drop down list with multiple checkboxes
- Many Excel users tend to create drop down list with multiple checkboxes in order to select multiple items from the list per time. Actually, you can’t create a list with multiple checkboxes with Data Validation. In this tutorial, we are going to show you two methods to create drop down list with multiple checkboxes in Excel.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!