excel怎么设置选项选择_使用Excel选项按钮选择答案

excel怎么设置选项选择

image

Male or female? English or French? Yes, No or Maybe? Those are just a few of the choices that you can make with Option Buttons in Excel. When people select answers with Excel Option Buttons, you can provide a list of possible answers to a questions, and users can only select one answer from the list.

男女不限? 英语还是法语? 是的,否或也许? 这些只是您可以在Excel中使用“选项按钮”进行的一些选择。 当人们使用Excel选项按钮选择答案时,您可以提供一个问题的可能答案列表,而用户只能从列表中选择一个答案。

选项按钮问题 (Option Button Questions)

You can use Option Buttons instead of Data Validation drop down lists, or instead of allowing free form answers. Do you use Option Buttons? Love them? Hate them?

您可以使用“选项按钮”代替“ 数据验证”下拉列表 ,或者代替使用自由格式的答案。 您是否使用选项按钮? 爱他们? 讨厌他们?

OptionButton12

准备添加Excel选项按钮 (Get Ready to Add Excel Option Buttons)

To add Option Buttons in Excel 2007, you'll use commands on the Ribbon's Developer tab.

要在Excel 2007中添加选项按钮,您将在功能区的“开发人员”选项卡上使用命令。

If you don't see that tab on your Excel Ribbon, follow the instructions here: Show the Developer Tab on Excel Ribbon

如果您在Excel功能区上看不到该选项卡,请按照此处的说明进行操作: 在Excel功能区上显示“开发人员”选项卡

添加群组框 (Add a Group Box)

To connect a set of Option Buttons to one another, you can enclose them in a Group Box control on the worksheet. By using Group Boxes, we could have one set of Option Buttons that show Language choices, and another set of Options Buttons for Age Group.

要将一组选项按钮相互连接,可以将它们封装在工作表上的“组框”控件中。 通过使用“组框”,我们可以有一组显示语言选择的选项按钮,以及另一组“年龄组”的选项按钮。

Without Group Boxes, all the Option Buttons on the worksheet would be connected, and you'd only be able to select one at a time. So, if we want users to answer two different questions, we'd create two Group Boxes for the Option Buttons.

如果没有“组框”,则工作表上的所有“选项”按钮都将被连接,并且您一次只能选择一个。 因此,如果我们希望用户回答两个不同的问题,我们将为“选项按钮”创建两个“组框”。

要添加组框: (To add a Group Box:)
  • On the Excel Ribbon, click the Developer tab

    在Excel功能区上,单击“开发人员”选项卡
  • In the Control group, click Insert

    在控制组中,单击插入
  • In the Form Controls section, click the Group Box command, to activate that tool.

    在“表单控件”部分中,单击“组框”命令以激活该工具。
OptionButton01
  • Click on the Excel worksheet, where you'd like the top left of the Group Box to appear.

    单击Excel工作表,您会在其中显示“组框”的左上角。

A Group Box is created, with the default name of Group Box 1.

创建了一个分组框,其默认名称为分组框1。

OptionButton02

修改组框 (Modify the Group Box)

You can change the Caption and size of the Group Box, to suit your needs.

您可以更改标题和组框的大小,以满足您的需要。

若要更改组框标题: (To change the Group Box Caption:)
  • With the Group Box selected, drag over the Caption text, to select it.

    选中“组框”后,将其拖到“标题”文本上以将其选中。
  • Type a new Caption for the Group Box.

    为组框键入一个新的标题。
OptionButton03

In the screenshot below, I've changed the Caption from Group Box 1 to Language.

在下面的屏幕截图中,我将标题从“组框1”更改为“语言”。

更改组框大小: (To change the Group Box size:)
  • With the Group Box selected, point to one of the round white handles on its border.

    选中“组框”后,指向其边框上的圆形白色手柄之一。
  • Drag the handle in or out, to change the size of the Group Box.

    向内或向外拖移手柄,以更改组框的大小。
  • You'll see an outline as you drag the handle, so release the mouse button when the outline is the size that you want,

    拖动手柄时,您会看到一个轮廓,因此,当轮廓达到所需大小时,释放鼠标按钮,

In the screenshot below, I've dragged the bottom right handle up and to the right, to make the Group Box shorter and wider.

在下面的屏幕截图中,我将右下方的手柄向上和向右拖动,以使“组框”更短和更宽。

OptionButton04

添加选项按钮 (Add the Option Buttons)

Now that the Group Box is created, you can add the Option Buttons inside the Group Box.

现在已经创建了Group Box,您可以在Group Box中添加Option Button。

  • On the Excel Ribbon's Developer tab, in the Controls group, click Insert

    在“ Excel功能区”的“开发人员”选项卡上的“控件”组中,单击“插入”。
  • In the Form Controls section, click the Option Button command, to activate that tool.

    在“表单控件”部分中,单击“选项按钮”命令以激活该工具。
    • Click inside the Group Box, where you want the top left of the Option Button to appear.

      在“组框”内单击,您要在其中显示“选项按钮”的左上方。
  • The entire Option Button and its Caption must be within the Group Box, so adjust the Group Box size, if necessary.

    整个选项按钮及其标题必须在Group Box内,因此,如有必要,请调整Group Box的大小。

In the screenshot below, I had to make the Group Box a bit taller, to fit the Option Button 2.

在下面的屏幕截图中,我必须将Group Box设置得更高一些,以适合Option Button 2。

OptionButton06

修改选项按钮 (Modify the Option Buttons)

Add as many Option Buttons as you need in the Group Box, so there's one for each possible answer. Then, you can change the Option Button captions.

在“组”框中添加所需数量的选项按钮,因此每个可能的答案都有一个。 然后,您可以更改选项按钮的标题。

更改选项按钮标题: (To change the Option Button Caption:)
  • Right-click on the Option Button, and click Edit Text.

    用鼠标右键单击选项按钮,然后单击编辑文本。
  • Select the existing Caption text, and type the new text for that Option Button

    选择现有的标题文本,然后为该选项按钮键入新文本

In the screenshot below, I've changed the Option Button Captions to English and French.

在下面的屏幕截图中,我将“选项按钮标题”更改为英语和法语。

OptionButton07

测试选项按钮 (Test the Option Buttons)

After you've created the Group Box, and added the Option Buttons, you can test the Option Buttons.

创建“组框”并添加“选项按钮”之后,可以测试“选项按钮”。

  • When you click a button, a black circle should appear in it.

    当您单击一个按钮时,其中应出现一个黑色圆圈。
  • All the other Option Buttons should change to white circles.

    所有其他“选项”按钮应更改为白色圆圈。
  • If one or more of the Options Buttons don't work correctly, adjust the Group Box size to enclose the entire Option Button and its label.

    如果一个或多个“选项按钮”无法正常工作,请调整“分组框”的大小以包围整个“选项按钮”及其标签。
OptionButton08

存储选项按钮选择 (Store the Option Button Selection)

On the worksheet, you can see which option has been selected in each Group Box. If you want to use that selection in a formula, or store it in a list, you can link the results to a worksheet cell.

在工作表上,您可以看到在每个组框中选择了哪个选项。 如果要在公式中使用该选择或将其存储在列表中,则可以将结果链接到工作表单元格。

要将选项框链接到单元格: (To link the Option Box to a cell:)
  • Right-click on any one of the Option Boxes in the Group Box.

    右键单击“组”框中的任何一个“选项”框。
  • In the popup menu, click Format Control

    在弹出菜单中,单击“格式控制”
OptionButton09
  • In the Format Control dialog box, click in the Cell link box

    在“格式控制”对话框中,单击“单元格”链接框
  • On the worksheet, click the cell where you want to store the Group Box selection number.

    在工作表上,单击要在其中存储“组框”选择号的单元格。
  • Click OK

    点击确定

In the screenshot below, the Option Box is linked to cell C3 on a sheet named Results.

在下面的屏幕截图中,“选项框”链接到名为“结果”的工作表上的单元格C3。

OptionButton10

Now, when you click on one of the Option Boxes in the Group Box, the Option Box's number will appear in the linked cell. The number is based on the order in which you created the Option Boxes.

现在,当您单击“组”框中的“选项框”之一时,选项框的编号将出现在链接的单元格中。 该数字基于您创建选项框的顺序。

OptionButton11

You could use that result in a formula, such as, =IF(Results!C3=2,"Bonjour","Hello")

您可以在公式中使用该结果,例如= IF(Results!C3 = 2,“ Bonjour”,“ Hello”)

创建调查表 (Creating a Survey Form)

To see an example of Option Boxes in a survey form, take a look at Dave Peterson's Excel Survey Template. It uses programming to create the Group Boxes and Option Boxes.

要查看调查表单中的选项框示例,请查看Dave Peterson的Excel Survey Template 。 它使用编程来创建“组框”和“选项框”。

观看选项按钮视频 (Watch the Option Button Video)

To see the steps for creating a Group Box with Option Boxes, watch this short Excel Option Buttons video.

要查看创建带有选项框的组框的步骤,请观看这​​段简短的Excel选项按钮视频。

演示地址

翻译自: https://contexturesblog.com/archives/2010/03/24/select-answers-with-excel-option-buttons/

excel怎么设置选项选择

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值