Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Counting selected option buttons in column?

My option buttons are grouped by row (one per cell) so only one of five can
be selected in each row. Now I need to know how many have been selected in
each of the five columns and totals stored in a cell. Will one of you VBA
gurus please help me count how many option buttons are selected in each
column? Also, if there is a better method other than the option button to
accomplish this, I'm all ears. I have been having the users put a number 1
in the column and then auto sum the 1's at the bottom, (quite easy), however,
users keep screwing up and having more than one "1" in a row so I'm need a
better method of control.
-JEFF-
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Counting selected option buttons in column?

Assuming option buttons from the control toolbox toolbar.
If you have the optionbuttons linked to cells, then just do a countif on the
cells for True.

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
My option buttons are grouped by row (one per cell) so only one of five

can
be selected in each row. Now I need to know how many have been selected

in
each of the five columns and totals stored in a cell. Will one of you VBA
gurus please help me count how many option buttons are selected in each
column? Also, if there is a better method other than the option button to
accomplish this, I'm all ears. I have been having the users put a number

1
in the column and then auto sum the 1's at the bottom, (quite easy),

however,
users keep screwing up and having more than one "1" in a row so I'm need a
better method of control.
-JEFF-



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Counting selected option buttons in column?

That works except it places the word "True" or "False" inside the cell behind
the control. It's purely aesthetics, but is there a way to prevent this?
-JEFF-

"Tom Ogilvy" wrote:

Assuming option buttons from the control toolbox toolbar.
If you have the optionbuttons linked to cells, then just do a countif on the
cells for True.

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
My option buttons are grouped by row (one per cell) so only one of five

can
be selected in each row. Now I need to know how many have been selected

in
each of the five columns and totals stored in a cell. Will one of you VBA
gurus please help me count how many option buttons are selected in each
column? Also, if there is a better method other than the option button to
accomplish this, I'm all ears. I have been having the users put a number

1
in the column and then auto sum the 1's at the bottom, (quite easy),

however,
users keep screwing up and having more than one "1" in a row so I'm need a
better method of control.
-JEFF-




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Counting selected option buttons in column?

You could format the font of the cell to be the same color as the
background.

You cold make the option button opaque and have it cover the cell

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
That works except it places the word "True" or "False" inside the cell

behind
the control. It's purely aesthetics, but is there a way to prevent this?
-JEFF-

"Tom Ogilvy" wrote:

Assuming option buttons from the control toolbox toolbar.
If you have the optionbuttons linked to cells, then just do a countif on

the
cells for True.

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
My option buttons are grouped by row (one per cell) so only one of

five
can
be selected in each row. Now I need to know how many have been

selected
in
each of the five columns and totals stored in a cell. Will one of you

VBA
gurus please help me count how many option buttons are selected in

each
column? Also, if there is a better method other than the option

button to
accomplish this, I'm all ears. I have been having the users put a

number
1
in the column and then auto sum the 1's at the bottom, (quite easy),

however,
users keep screwing up and having more than one "1" in a row so I'm

need a
better method of control.
-JEFF-






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Counting selected option buttons in column?

Can I control the properties of these option buttons that are "from the
control toolbox toolbar" using VBA code? When I recorded a macro and changed
properties of an option button, it did not show up in the macro code.
-JEFF-

"Tom Ogilvy" wrote:

You could format the font of the cell to be the same color as the
background.

You cold make the option button opaque and have it cover the cell

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
That works except it places the word "True" or "False" inside the cell

behind
the control. It's purely aesthetics, but is there a way to prevent this?
-JEFF-

"Tom Ogilvy" wrote:

Assuming option buttons from the control toolbox toolbar.
If you have the optionbuttons linked to cells, then just do a countif on

the
cells for True.

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
My option buttons are grouped by row (one per cell) so only one of

five
can
be selected in each row. Now I need to know how many have been

selected
in
each of the five columns and totals stored in a cell. Will one of you

VBA
gurus please help me count how many option buttons are selected in

each
column? Also, if there is a better method other than the option

button to
accomplish this, I'm all ears. I have been having the users put a

number
1
in the column and then auto sum the 1's at the bottom, (quite easy),
however,
users keep screwing up and having more than one "1" in a row so I'm

need a
better method of control.
-JEFF-








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Counting selected option buttons in column?

Yes, but you can't record the changes.

sheet1.Textbox1.BackColor = rgb(255,0,0)

as an example.

--
Regards,
Tom Ogilvy


"-JEFF-" wrote in message
...
Can I control the properties of these option buttons that are "from the
control toolbox toolbar" using VBA code? When I recorded a macro and

changed
properties of an option button, it did not show up in the macro code.
-JEFF-

"Tom Ogilvy" wrote:

You could format the font of the cell to be the same color as the
background.

You cold make the option button opaque and have it cover the cell

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
That works except it places the word "True" or "False" inside the cell

behind
the control. It's purely aesthetics, but is there a way to prevent

this?
-JEFF-

"Tom Ogilvy" wrote:

Assuming option buttons from the control toolbox toolbar.
If you have the optionbuttons linked to cells, then just do a

countif on
the
cells for True.

--
Regards,
Tom Ogilvy

"-JEFF-" wrote in message
...
My option buttons are grouped by row (one per cell) so only one of

five
can
be selected in each row. Now I need to know how many have been

selected
in
each of the five columns and totals stored in a cell. Will one of

you
VBA
gurus please help me count how many option buttons are selected in

each
column? Also, if there is a better method other than the option

button to
accomplish this, I'm all ears. I have been having the users put a

number
1
in the column and then auto sum the 1's at the bottom, (quite

easy),
however,
users keep screwing up and having more than one "1" in a row so

I'm
need a
better method of control.
-JEFF-








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
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Forms Option Buttons(Can be right mouse selected when sheet is loc Newbeetle Excel Discussion (Misc queries) 2 February 10th 07 04:12 PM
Navigating between option buttons is not selecting the option drhalter Excel Programming 1 June 3rd 05 02:28 PM
Navigating between option buttons is not selecting the option Gixxer_J_97[_2_] Excel Programming 4 June 2nd 05 02:50 PM
Option Buttons Alan Excel Programming 1 January 8th 04 05:55 PM


All times are GMT +1. The time now is 03:25 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"