Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


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.
doc warning if duplicate 1

Warning if duplicates entered with Data Validation

Warning if duplicates entered with Prevent Duplicategood idea3

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:
doc warning if duplicate 2

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:
doc warning if duplicate 3

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:
doc warning if duplicate 4

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.
doc warning if duplicate 5

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.
doc warning if duplicate 6

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.
doc warning if duplicate 7

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 120 handy functions, makes your jobs 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:
doc warning if duplicate 8

Then click Yes > OK to continue the operation.

doc warning if duplicate 9
doc warning if duplicate 10

Now a warning dialog pops out if you enter a duplicate value in the selection. See screenshot:
doc warning if duplicate 11

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).
doc warning if duplicate 12

Recommended Productivity Tools for Excel

kte tab 201905

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.