
上QQ阅读APP看书,第一时间看更新
1.3.2 限制输入数据的大小
如果要求所输入的交通费金额必须小于指定的金额,其操作如下。
❶选择需设置的单元格区域,切换到“数据”选项卡,在“数据工具”组中单击“数据验证”按钮,如图1-38所示。

图1-38
❷打开“数据验证”对话框,在“允许”下拉列表中选择“整数”,在“数据”下拉列表中选择“小于”,然后设置“最大值”,如图1-39所示。

图1-39
❸切换到“出错警告”选项卡,在“错误信息”文本框中输入警告信息,如图1-40所示。

图1-40
❹单击“确定”按钮。当在单元格中输入大于400的整数时,即会弹出警告提示框,如图1-41所示。

图1-41