close

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?.?

Sherry wrote:
gt; I want to create a survey with the option buttons to click. Is it
gt; possible to have the chosen option button to = 1 while the unchosen
gt; option button = 0 and to have the 1's tally in a colum on page 2? I
gt; 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?

I've put an example on excelforum for you -------------------------------------------------------------------
|Filename: YesNo.zip |
|Download: www.excelforum.com/attachment.php?postid=4793 |
-------------------------------------------------------------------

--
CaptainP
------------------------------------------------------------------------
CaptainP's Profile: www.excelforum.com/member.php...oamp;userid=34520
View this thread: www.excelforum.com/showthread...hreadid=543903
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(quot;$A1:$A12quot;), Target).Address = Range(quot;$A1:$A12quot;).Address
Then
If Selection = quot;aquot; Then
Selection.ClearContents

Else
With Selection.Font
.Name = quot;Webdingsquot;
.Size = 10
End With
ActiveCell.FormulaR1C1 = quot;aquot;
End If
ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
End If
End Subnow in another range you can enter a funtion like this
=COUNTA(A1:A12,quot;aquot;)

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 percentageJust an option!!--
davesexcel------------------------------------------------------------------------
davesexcel's Profile: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=543903Debra Dalgleish has sample workbook using optionbuttons:
www.contextures.com/xlform01.html

Although, for just two options, I think a checkbox is more natural.

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

--

Dave Peterson

davesexcel wrote:
gt; I can only get 1 or 2 out of the checkboxes, you can still tally them
gt; up though
I get TRUE or FALSE not 1 or 2. And if used in aritmatic, TRUE evaluates as
1 and FALSE as 0
CaptainP wrote:
gt; I've put an example on excelforum for you
gt;
gt;
gt; -------------------------------------------------------------------
gt;gt; Filename: YesNo.zip |
gt;gt; Download: www.excelforum.com/attachment.php?postid=4793 |
gt; -------------------------------------------------------------------

Since excelforum always posts invalid urls, the correct one for this example
is:

www.excelforum.com/attachment...3amp;d=1148120690

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()