跳到主要内容

如何防止Excel中的列重复输入?

众所周知,数据验证是Excel中非常有用的功能,您可以使用它在单元格中创建下拉列表并限制用户可以输入的值。 但是有时您可能希望阻止用户在工作表范围内输入重复的值。 如何避免在Excel中重复输入?

使用数据验证功能防止重复输入

一键快速防止重复输入


箭头蓝色右气泡使用数据验证功能防止重复输入

例如,我要在一系列单元格(A1:A20)中输入识别卡号,并且我想确保在A1:A20范围中输入的所有项目号都是唯一的。 为防止重复,请按照下列步骤操作:

1.选择将包含项目编号的单元格范围。

2。 去 时间 > 数据验证 > 数据验证。 看截图:

文档防止重复条目1

3.和一个 数据验证 将显示对话框。 点击 个人设置 标签,然后单击下面的下拉列表 ,选择 定制版,然后输入此公式“= COUNTIF($ A $ 1:$ A $ 20,A1)= 1“ 进入 公式 框。 看截图:

文档防止重复条目2

4.然后单击 错误警报 标签,在 标题 框中,输入“双重输入”,然后在错误消息框中输入正确的消息,例如“该值已输入。 所有项目编号必须唯一。 请再试一次设立的区域办事处外,我们在美国也开设了办事处,以便我们为当地客户提供更多的支持。“

文档防止重复条目3

5。 点击 OK 完成它。

现在,当您输入重复的数字时,Excel将阻止输入,并向用户警告一条错误消息,它将显示如下:

文档防止重复条目4


箭头蓝色右气泡一键快速防止重复输入

对于我们来说,使用数据验证功能来防止重复输入有些困难,现在,我将向您介绍一种简单快速的方法来解决此任务。

Kutools for Excel: 带有超过300个方便的Excel加载项,可以在30天内免费试用。 立即获取.

使用 Kutools for Excel,您可以一键防止重复条目。请按如下操作:

1.选择要防止重复输入的范围。

2。 点击 库工具 > 防止重复输入,请参见屏幕截图:

文档防止重复条目5

现在,当您输入的数据与该范围内的第一个数据相同时,您将收到以下警告:

文档防止重复条目6

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (35)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks....... A Lot...........
This comment was minimized by the moderator on the site
N'a tout simplement pas le comportement que vous décrivez.
This comment was minimized by the moderator on the site
I used your formula to restrict 6-number duplicates. But it gives me a warning to whatever number I enter. I'm sure it is detecting by per digit instead of the whole number? How do i solve this?
This comment was minimized by the moderator on the site
not working properly. only work in manual entry if i use "CTRL+D" then it allows duplicate entry.
This comment was minimized by the moderator on the site
i want to select the name of workers to whom duty allotted to a particular place what excel formula is to be used to find if i use vlook formula is shows the last worker repeatedly
This comment was minimized by the moderator on the site
I have same problem like some other users do. I used this formula, but now i can't enter any value. What might be wrong?
This comment was minimized by the moderator on the site
I used your formula to restrict name duplications. But then it is giving warning to whatever name I enter. Maybe it is detecting by per alphabet instead of the whole name? How can I solve this problem?
This comment was minimized by the moderator on the site
I am currently using this to not allow duplicates for a form of a schedule. However there are some exceptions I need to allow to be duplicated. Is there a way to allow certain values or in my case text to be duplicated while everything else is not allowed?
This comment was minimized by the moderator on the site
How i do the opposite? i have a column of data and want to warn the user if they are entering a NEW item number that doesn't match any previous enteries
This comment was minimized by the moderator on the site
[quote]How i do the opposite? i have a column of data and want to warn the user if they are entering a NEW item number that doesn't match any previous enteriesBy GARY[/quote] Hi Gary As you have mentioned that user is allowed only to enter duplicate data not unique and there are some entries available within particular range. Plz try this.... "=countif($A$1:$A$20,A1)>1"
This comment was minimized by the moderator on the site
thanks alot for the tips, but need your more help as i am working on sheet where i have to record the name of the trainees of the year 2015, so not to train the same trainess again 2017 i have to design the database which shows me the duplicate name by highlighting it, so please help me with it.
This comment was minimized by the moderator on the site
Hi Baseer Plz select both data 2015 and 2017 and follow as below.... Home->conditional Formatting ->Highlight Cells Rules->Duplicate Values... Click on OK. Duplicate names will be highlighted.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations