Skip to main content

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 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:
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

Best Office Productivity Tools

Supercharge Your Spreadsheets: Experience Efficiency Like Never Before with Kutools for Excel

Popular Features: Find/Highlight/Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns     Move Columns   |   Unhide Columns   |   Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolset12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   Many More...

Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...

Supports Office/Excel 2007-2021 & newer, including 365   |   Available in 44 languages   |   Enjoy a full-featured 30-day free trial.

kte tab 201905


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!
Comments (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This does not work - your formula is wrong.
This comment was minimized by the moderator on the site
I have tested, it works, show your example.
This comment was minimized by the moderator on the site
this is trash. check your formula. is not working.

This comment was minimized by the moderator on the site
I have tested, it works, show your example, formula and screenshot
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations