跳到主要內容

如何防止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


箭頭藍色右氣泡一鍵快速防止重複輸入

對於我們來說,使用數據驗證功能來防止重複輸入有些困難,現在,我將向您介紹一種簡單快速的方法來解決此任務。

Excel的Kutools: 帶有300多個便捷的Excel加載項,可以在30天內免費試用。 立即獲取.

使用Kutools for Excel,您可以一鍵阻止重複的條目。 請這樣做:

1.選擇要防止重複輸入的範圍。

2。 點擊 庫工具 > 防止重複輸入,請參見屏幕截圖:

文檔防止重複條目5

現在,當您輸入的數據與範圍中的第一個數據相同時,您將收到以下警告:

文檔防止重複條目6

最佳辦公生產力工具

熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

kte選項卡201905


Office選項卡為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