Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting checkboxes
Is it possible to count up the "true" values of a series of checkboxes? If
so, what is the formula? -- Thanks, Manny |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting checkboxes
The easiest way is to link the checkbox's to cells in your sheets. If the
checkboxes come from the control toolbox then add a reference to the LinkedCell property (put the sheet in design mode and right click the checkbox and select Properties). If the check boxes are from the forms toolbar then right click the check box and select Format control | control. Once you have linked each checkbox to a cell you can do a simple countif function to get the number of checks... -- HTH... Jim Thomlinson "Manny" wrote: Is it possible to count up the "true" values of a series of checkboxes? If so, what is the formula? -- Thanks, Manny |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting checkboxes
If you name your CheckBox'es so that they start with the same text
("CheckBox" for this example) and end in numbers of the same length (that is, use leading zeroes if there are more than 9 CheckBox'es; that is, the first 9 names should end with 01, 02, 03, etc. instead of just 1, 2, 3, etc.), then this code will count the number of with check marks in them... Dim X As Long Dim Count As Long Dim C As Control For Each C In Me.Controls If C.Name Like "CheckBox##" Then If C.Value = True Then Count = Count + 1 End If Next Rick "Manny" wrote in message ... Is it possible to count up the "true" values of a series of checkboxes? If so, what is the formula? -- Thanks, Manny |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting checkboxes
If the checkboxes were from the ControlToolbox and are on the Worksheet:
Sub chbx() For i = 1 To 5 If Sheets(1).Shapes(i).Name = "CheckBox" & i Then If Sheets(1).OLEObjects("CheckBox" & i).Object _ .Value = True Then x = x + 1 End If End If Next MsgBox x End Sub Somebody has already posted the code for other conditions.. "Manny" wrote: Is it possible to count up the "true" values of a series of checkboxes? If so, what is the formula? -- Thanks, Manny |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting checkboxes
I just wanted to say thanks to everyone for your help!!! It is surely
appreciated. Manny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting CheckBoxes | Excel Programming | |||
Counting CheckBoxes on a Userform | Excel Programming | |||
Counting Checkboxes | Excel Programming | |||
Counting checkboxes with a true value | Excel Programming | |||
Counting checkboxes | Excel Programming |