Excel条件数据验证

Happy Canadian Thanksgiving! You probably have your own spreadsheet to organize the meal, but you can download my Excel Holiday Dinner Planner, if you don't have one of your own.

加拿大感恩节快乐! 您可能有自己的电子表格来组织用餐,但是如果您自己没有,可以下载我的Excel Holiday Dinner Planner

The dinner planner has data validation cells, where you can select a start time, or type of food, or cooking location, from a drop down list.

晚餐计划者具有数据验证单元,您可以在其中从下拉列表中选择开始时间,食物类型或烹饪位置。

datavalidationcond02

数据验证下拉 (Data Validation Drop Down)

Doug Glancy sent me a sample data validation file that he created, that uses a variation on dependent data validation. I changed his file a bit, to "Thanksgiving" it up. The file has a list of Thanksgiving dinner guests, whether they'd like turkey, and if so, the number of slices.

Doug Glancy给我发送了他创建的样本数据验证文件,该文件使用了相关数据验证的变体。 我稍微修改了他的文件,改为“感恩节”。 该文件包含感恩节晚餐客人的列表,他们是否想要火鸡,如果想要的话,还有切片的数量。

In column B there's a simple data validation drop down list, where you can select TRUE or FALSE.

在B列中,有一个简单的数据验证下拉列表,您可以在其中选择TRUE或FALSE。

datavalidationcond01

条件数据验证 (Conditional Data Validation)

In column C, there is a conditional data validation drop down list, based on the selection in column B. If TRUE was selected, there is a drop down list with numbers (NumList), and if FALSE was selected, there is no drop down list.

在C列中,基于B列中的选择,有一个条件数据验证下拉列表。如果选择TRUE,则有一个带数字的下拉列表(NumList),如果选择FALSE,则没有下拉列表清单。

datavalidationcond03

To create the conditional data validation, Doug created a named formula -- Test. With cell C2 selected, the Test formula is:

为了创建条件数据验证,Doug创建了一个命名公式-Test。 选中单元格C2,测试公式为:

=IF(TurkeyOption!$B2=TRUE,NumList)

= IF(TurkeyOption!$ B2 = TRUE,NumList)

In column C, the data validation is a list, with the source =Test

在C列中,数据验证是一个列表,其中包含= Test

datavalidationcond04

条件格式 (Conditional Formatting)

To highlight the cells where a number of slices should be entered, Doug added conditional formatting in column C. The cell will turn yellow if TRUE was selected in column B, and the number of slices hasn't been entered.

为了突出显示应在其中输入多个切片的单元格,Doug在C列中添加了条件格式。如果在B列中选择了TRUE,并且未输入切片数,则该单元格将变为黄色。

=AND($C2="",$B2=TRUE)

= AND($ C2 =“”,$ B2 = TRUE)

datavalidationcond05

下载样本文件 (Download the Sample File)

Thanks, Doug, for sending your sample file. You can download Doug's Excel Conditional Data Validation sample file, to see how it's set up.

感谢Doug发送您的示例文件。 您可以下载Doug的Excel条件数据验证示例文件,以了解其设置方式。

The file is zipped, and in Excel 2003 format, with no macros. _____________

该文件已压缩,并且为Excel 2003格式,没有宏。 ______________

翻译自: https://contexturesblog.com/archives/2010/10/11/excel-conditional-data-validation/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值