Tallying the total amount of checkboxes checked

Brad123

New Member
Joined
Jul 24, 2002
Messages
3
How can I add checkboxes and get a total? I'm using checkbox under the forms toolbar. Is there another way to do this without using checkboxes? (i want the sheet to tally how many "yes" or "no" boxes are checked.)
Thanks!
Brad
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Right click each check box and choose Format Control. Assign a cell link (different cells for each).

The cells will show TRUE if checked, FALSE if not.

Assuming you have 3 checkboxes linked to cells A1:A3 enter the following formula in cell A4:

=COUNTIF(A1:A3,"True")
 
Upvote 0
Hi Brad

You may find this alternative helpful


Have a Cell Ticked Upon Selection

This code must be placed in the Private Module of the Worksheet. To get there right click on the sheet name tab and select "View Code".

This code is an alternative to Checkboxes and can save a lot of space and is much easier to count the ticks! Just use the COUNTIF Function. This code works on only range A1:A10, but can be modified to suit. It could also be used in the Before Double Click event.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 If Target.Cells.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
        Target.Font.Name = "Marlett"
        If Target = vbNullString Then
           Target = "a"
        Else
           Target = vbNullString
        End If
    End If
End Sub


Taken from: http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top