Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MarkS
 
Posts: n/a
Default How do I count selected controls in a formula - without VBA?

I have a worksheet that is my log of occupational injuries and illnesses.
Each row is a unique record for which information is recorded in the columns.
Four of the columns request and "check mark" to select the right
classification of injury. Because only one of these columns can have a check
mark, I've placed option buttons from the Control Toolbox in them. Two
questions:

1) At the bottom of each column is a totals line. How do I write a formula
in the cell that counts the total number of option boxes that have been
selected in the column? And doing so without knowledge of VBA - I have no
idea how VBA works.

2) How can I copy the the set of four option buttons to all the rows and
maintain the selection as unique to those four option buttons? When I tried
to copy the option buttons to the next row, Excel then considered it to be a
set of eight buttons instead of a new set of four. I figured out how to
rename the set in the Properties dialogue, but doing so for the whole
document would give me hand cramps.

The option buttons don't seem to be connected to the cell in which I placed
them. When I copy those cells, the option boxes don't copy. I have a
feeling this is all connected with my first two questions.

Thanks.

Mark
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think I may have used a checkbox (checked or unchecked seems reasonable for a
yes/no question).

(I'd use checkboxes from the Forms toolbar--I find them easier to work with.)

Then you can assign a "cell link" to each checkbox.
(rightclick on the checkbox, select format control and look at the control tab.

That value in that "cell link" will be true when the checkbox is checked.

Then you can just use an =countif() formula:

=countif(a1:a10,true)

(if a1:a10 held the cell links)

MarkS wrote:

I have a worksheet that is my log of occupational injuries and illnesses.
Each row is a unique record for which information is recorded in the columns.
Four of the columns request and "check mark" to select the right
classification of injury. Because only one of these columns can have a check
mark, I've placed option buttons from the Control Toolbox in them. Two
questions:

1) At the bottom of each column is a totals line. How do I write a formula
in the cell that counts the total number of option boxes that have been
selected in the column? And doing so without knowledge of VBA - I have no
idea how VBA works.

2) How can I copy the the set of four option buttons to all the rows and
maintain the selection as unique to those four option buttons? When I tried
to copy the option buttons to the next row, Excel then considered it to be a
set of eight buttons instead of a new set of four. I figured out how to
rename the set in the Properties dialogue, but doing so for the whole
document would give me hand cramps.

The option buttons don't seem to be connected to the cell in which I placed
them. When I copy those cells, the option boxes don't copy. I have a
feeling this is all connected with my first two questions.

Thanks.

Mark


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count formula Vibha Excel Worksheet Functions 2 January 21st 05 05:26 PM
Formula to count the cells in a range that have a fill color. Molly F Excel Discussion (Misc queries) 2 January 19th 05 06:15 PM
Count If Formula for multiple conditions?? How To?? LPrain Excel Worksheet Functions 1 December 6th 04 09:18 PM
Group by count formula nobrabbit Excel Worksheet Functions 1 November 7th 04 09:10 PM
Count If Formula Mimi Excel Worksheet Functions 0 November 5th 04 11:55 AM


All times are GMT +1. The time now is 09:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"