How to pop out a warning if duplicate entered in an Excel column?
If you want to remind users that they cannot enter duplicates with a popped-out warning dialog as below screenshot shown. How can you quickly and easily solve it in Excel? The following methods maybe can give you the answers.
Warning if duplicates entered with Data Validation
Warning if duplicates entered with Prevent Duplicate
Warning if duplicates entered with Data Validation
In Excel, you can use a formula in Data Validation to warn and stop entering if a duplicate is entered in a selection.
1. Select a range, supposing A1:A10, and click Data > Data Validation > Data Validation. See screenshot:
2. Then in the Data Validation dialog, under the Settings tab, choose Custom from the Allow drop-down list, and type this =COUNTIF($A$1:$A$10,A1)=1 in the Formula text box. See screenshot:
3. Click Error Alert tab, and check Show error alert after invalid data is entered, and select Stop in the Style list, and specify the title and message contents as you need. See screenshot:
4. Click OK. Now while you entering a duplicate into the selection (A1:A10), the warning dialog will be popped out, and whichever options you choose in the dialog, it will remove the duplicate data you entered.
Tip: If you just want to warn users no entering duplicates only but not remove the entries, in the Data Validation dialog, under Error Alert tab, check Warning in the Style list.
Then while entering a duplicate, a warning pops out to remind you, if you want to retain the duplicate, click Yes or Cancel, if not, click No.
Warning if duplicates entered with Prevent Duplicate
If you do not want to remember the formula, you can use Kutools for Excel’s Prevent Duplicate utility to handle this job.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. |
After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)
Select a range you want to pop out a warning while duplicates entered, click Kutools > Prevent Typing > Prevent Duplicate. See screenshot:
Then click Yes > OK to continue the operation.
![]() |
![]() |
Now a warning dialog pops out if you enter a duplicate value in the selection. See screenshot:
With Prevent Typing utility, you also can prevent special characters entering (such as@#$%^), prevent certain characters entering (type them in Prevent type in these chars), or only allow some characters entered (type these lucky characters in Allow to type these chars).
Demo
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!




