sql条目只允许有一条
数据验证中允许的无效条目 (Invalid Entries Allowed in Data Validation)
Why are invalid entries allowed in Data Validation sometimes? Have you ever set up a data validation drop down list, so you can select valid items from a drop down list, and Excel allows people to type anything they want into that cell? See why that happens, and how you can prevent the problem.
为什么有时在数据验证中允许使用无效条目? 您是否曾经设置过数据验证下拉列表 ,因此可以从下拉列表中选择有效项目,而Excel允许人们在该单元格中键入他们想要的任何内容? 了解发生这种情况的原因,以及如何预防该问题。
For example, select a season in column B, and then choose from a list of months for that season, in column C
例如,在B列中选择一个季节,然后在C列中从该季节的月份列表中选择
After you select a season, if you type an invalid month name in the adjacent cell, you'll see a warning message.
选择季节后,如果在相邻的单元格中输入无效的月份名称,则会看到警告消息。
数据验证中允许的无效条目 (Invalid Entries Allowed in Data Validation)
However, despite the data validation rules, people sometimes type invalid entries in the month column, and the Excel data validation doesn't stop them.
但是,尽管有数据验证规则,人们有时仍会在“月”列中键入无效的条目,而Excel数据验证并不会阻止它们。
What went wrong with the data validation setup, and how can you fix it?
数据验证设置出了什么问题,如何解决?
空白问题 (Problem With Blanks)
In this example, the Month column has dependent data validation, based on the season that was selected in column B. If the Ignore Blank setting is turned on, then you'll be able to enter any value in a Month cell, if the Season cell is blank.
在此示例中,Month列具有基于B列中选择的季节的相关数据验证 。如果启用了“ 忽略空白”设置,则您可以在Month单元格中输入任何值(如果Season)单元格为空。
To prevent those invalid entries:
为防止这些无效条目:
- Select the Data Validation cells 选择数据验证单元格
- On the Ribbon's Data tab, click Data Validation 在功能区的“数据”选项卡上,单击“数据验证”
In the Data Validation dialog box, on the Settings tab, remove the check mark for Ignore Blank, then click OK
在“数据验证”对话框的“设置”选项卡上,删除“ 忽略空白”的复选标记,然后单击“确定”。
With the Ignore Blanks setting changed, if the Season cell is blank, you won't be able to enter anything in the Month column.
更改“忽略空白”设置后,如果“季节”单元格为空白,则您将无法在“月份”列中输入任何内容。
源列表中的空白单元格 (Blank Cells in Source List)
You might see this problem with invalid entries in other situations too.
您可能还会在其他情况下看到无效条目的问题。
For example, if the source list is a named range that contains blank cells, users may be able to type any entry, without receiving an error message.
例如,如果源列表是包含空白单元格的命名范围 ,则用户可以键入任何条目,而不会收到错误消息。
To prevent this, turn off the Ignore Blank setting, as described above. There are more instructions, and screen shots here.
为避免这种情况,请如上所述关闭“ 忽略空白”设置。 这里有更多说明和屏幕截图 。
错误警报 (Error Alerts)
If the data validation Error Alert is turned off, users will be able to type any entry, without receiving an error message. To turn the Error Alert on:
如果关闭了数据验证错误警报 ,则用户将能够键入任何条目,而不会收到错误消息。 要打开错误警报 ,请执行以下操作:
- Select the Data Validation cells 选择数据验证单元格
- On the Ribbon's Data tab, click Data Validation 在功能区的“数据”选项卡上,单击“数据验证”
In the Data Validation dialog box, on the Error Alert tab, add a check mark for Show Error Alert After Invalid Data is Entered, then click OK
在“数据验证”对话框的“错误警报”选项卡上,为“输入无效数据后显示错误警报”添加一个复选标记,然后单击“确定”。
翻译自: https://contexturesblog.com/archives/2010/06/25/invalid-entries-allowed-in-data-validation/
sql条目只允许有一条