How can I sum the number of check boxs, checked in excell 2003

A

Arfa

I would like to total the number of check boxs in a column, that have been
checked.

Using Excel 2003

Thanks
AL
 
B

Bob Phillips

Dim chk As CheckBox
Dim c As Long

For Each chk In ActiveSheet.Checkboxes
If chk.Value = Then c = c + 1
Next chk

MsgBox c


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
T

Toppers

You will need VBA code to do this.

Personally, i think a a "better" solution is to use Data Validation with
YES/NO (or Y/N)options and then use (for example) SUMIF to calculate number
"checked" i.e answer of "YES" (or "Y")

=SUMIF(A2:A100,"Y")
 
B

Bob Phillips

You are right John, but he could use checkboxes and link that to cells (D1,
D2 etc.) and then just use

=COUNTIF(D1:D10,TRUE)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top