Option Buttons in Excel 2000
See if this is of any help
Dim i As Long
Dim ob As OptionButton
Dim col As Range
Dim aryColLeft
Dim aryCounts
ReDim aryColLeft(1 To 4)
ReDim aryCounts(1 To 4)
For Each col In Columns("B:E")
i = i + 1
aryColLeft(i) = col.Left
Next col
For Each ob In ActiveSheet.OptionButtons
If ob.Value = 1 Then
i = Application.Match(ob.TopLeftCell.Left, aryColLeft, 0)
aryCounts(i) = aryCounts(i) + 1
End If
Next ob
MsgBox aryCounts(1)
MsgBox aryCounts(2)
MsgBox aryCounts(3)
MsgBox aryCounts(4)
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"LPS" wrote in message
...
Using Excel 2000 I have a user who has created a spreadsheet using option
buttons across 4 columns, describing a rating system of 0 - 3. He has 24
rows of criteria being rated, using these option buttons. At the end of
the
rows, he would like to total the number of option buttons used in each
column. Is there a function or other method to do this?
Thank you for any help.
--
LPS
|