Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percentage of Checkboxes = True 1

Status
Not open for further replies.

RP1America

Technical User
Aug 17, 2009
221
0
0
US
I have 33 activex checkboxes on an excel sheet. I would like to be able to calculate the percentage of how many of those are checked.

Thoughts?
 



hi,

Are each of these not linked to a cell on the sheet?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


Then you'll have to loop thru the SHAPES on the sheet, determining which are CheckBoxes to 1) count existence and 2) count state of interest.

This might help: faq707-4594

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Yikes! Not sure how that relates, because that went way over my head.

If the checkboxes were linked to cells, would there be an easier way to accomplish this?
 



Yes, just use the AverageIf() function over the range of linked cells

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


FYI, I rarely if ever place a control on multiple rows.

I would add ONE CheckBox control on the sheet and make its Visible property FALSE until the user select ONE CELL in the range intended for entry by the CheckBox. In that event, the Worksheet_SelectionChange event, 1) the control is POSITIONED IN THE CELL, using the TOP, LEFT, HEIGHT, & WIDTH properties, made Visible and then on that control's CHANGE event, the VALUE is placed in the cell that has the control's TOPLEFT property.

ONE CONTROL for MULTIPLE CELLS. ;-)

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top