survey

S

Sherry

I want to create a survey with the option buttons to click. Is it possible to
have the chosen option button to = 1 while the unchosen option button = 0
and to have the 1's tally in a colum on page 2? I hope this question was
clear?.?
 
P

Paul Lautman

Sherry said:
I want to create a survey with the option buttons to click. Is it
possible to have the chosen option button to = 1 while the unchosen
option button = 0 and to have the 1's tally in a colum on page 2? I
hope this question was clear?.?

The answer is yes, but if you only want 1 or 0, wouldn't it be better to use
check boxes?
 
D

davesexcel

I can only get 1 or 2 out of the checkboxes, you can still tally them up
though

Here is another option

A right click -check mark, paste this code into the worksheet module

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True

If Union(Range("$A1:$A12"), Target).Address = Range("$A1:$A12").Address
Then
If Selection = "a" Then
Selection.ClearContents

Else
With Selection.Font
..Name = "Webdings"
..Size = 10
End With
ActiveCell.FormulaR1C1 = "a"
End If
ActiveCell.Offset(1, 0).Range("A1").Select
End If
End Sub


now in another range you can enter a funtion like this
=COUNTA(A1:A12,"a")

Change the ranges as you require

but for this example when you right click in the range A1:A12 a check
mark appears or disappears

the counta function will count the number of checkmarks in that range,
then you can formulate the total to get a percentage


Just an option!!
 
P

Paul Lautman

davesexcel said:
I can only get 1 or 2 out of the checkboxes, you can still tally them
up though
I get TRUE or FALSE not 1 or 2. And if used in aritmatic, TRUE evaluates as
1 and FALSE as 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top