• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Excel Tutorials by Y. Acosta

Excel Tutorials + Tips

  • Excel Tutorials
  • Etsy Store
  • Other Resources
  • About Me
    • About Me
    • Contact Me
    • FREE Printable List of Top Excel Keyboard Shortcuts
  • FREE pdf of Top Excel Shortcuts!

Prevent Duplicate Entries in Excel (+ video tutorial)

❤ Support Free Excel Training by Sharing -

We may be compensated for your purchase of any of the products featured on this page – it helps us keep the lights on :)

There are times you may want to prevent duplicate entries in Excel. For example, if you’re working with a list of invoice numbers and don’t want to accidentally repeat any of them.

You can limit the number of times a number (or word) is repeated in a column, row, or a selected range of cells by applying a custom Data Validation rule to those cells.

What is Data Validation in Excel?

Data Validation in Excel is a feature used to limit what is entered in a cell(s) to entries that fit specific criteria. For example, say you have a column for state abbreviations, you may want to restrict the number of characters entered to only 2 per cell.

The criteria is set in the form of a Data Validation rule.

When you apply a Data Validation rule to a range of cells, Excel checks what is entered in each cell to see if it matches the requirements of the rule. If it does not, it will prevent the user from making the entry until they correct it to match the rule or alert them that their entry does not match the parameters of the rule. You can choose the type of alert.

Click here to read our article on how you can customize your own Data Validation Alerts to prevent an entry or simply communicate a warning.

You can find Data Validation in the Excel Ribbon. It will be in the Data tab / in the Data Tools section. Click on Data Validation to open it.

Find Data Validation in Excel Ribbon in Data tab / Data Tools section
Find Data Validation in Excel Ribbon in Data tab / Data Tools section

Data Validation Custom Rule to Prevent Duplicate Entries

Click here to watch the tutorial

To create a custom Data Validation rule, go to the Settings tab of the Data Validation feature. In the “Allow:” field box select Custom.

Data Validation / Settings tab
Data Validation / Settings tab

Then, in the “Formula:” field box enter:

=COUNTIF(range, criteria)=#

Here’s how –

The COUNTIF function will count a cell if it matches the criteria that you set.

  1. “range” will be the range of cells you would like to apply the Data Validation rule to. This can be a column, a row, or a combination of. *Making sure to lock the range of cells by using your F4 key to create an absolute reference.
  2. “criteria” will be what the function will evaluate the other entries against. In this example, you will set this to the first cell in your range. This is important to ensure that no cells in your range are missed by your Data Validation rule.
  3. Lastly, you will need to include =1 (or other number*) at the end of your COUNTIF function. 

*The 1 represents the number of times you want to allow the number or text to be entered in the selected cells. For example, if you would like for the entry to appear no more than 2 times, you would use =2.

Data Validation Custom Rule to Prevent Duplicates example
Data Validation Custom Rule to Prevent Duplicates example

Want to learn more about Data Validation? Here’s how you can apply multiple Data Validation rules to the same cells



Prevent Duplicate Entries in Excel (Pinterest Pin)

Related Articles:

  • Apply Multiple Data Validation Rules in Excel (feat. image, thumbnail)
    3 Steps - Apply Multiple Data Validation…
  • How to set a length limit on Excel cells - Tutorial
    How to Set Character Limit in Excel Cells…
  • Data Validation Error Alerts image
    Data Validation Error Alert Messages in…

❤ Support Free Excel Training by Sharing -

blank

About Y. Acosta

Yil's (pronounced like "Jill") passion for Excel spreadsheets can be traced back to her days in marketing, where she spent significant time working on analytics. As a content creator, she now specializes in Excel spreadsheet tutorials. Make sure to visit the About page to learn more.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow us:

Latest Tutorial:

Featured image for How to Use Find & Replace to Remove Wildcard Characters in Excel article

Click Here for More Excel Tutorials!!!

Get Your FREE pdf of Top Excel Keyboard Shortcuts!

* indicates required

blank

Image-button for Invoice Template for Etsy

Copyright © 2025

  • Home
  • Excel Tutorials
  • Resources
  • About Me
  • Privacy Policy & Terms of Use
  • Disclaimer
  • Advertiser Disclosure
  • Contact Me
  • FREE Printable List of Top Excel Keyboard Shortcuts
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
SettingsAccept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT