


How to prevent duplicate entries in Excel column, only unique data allowed.
May 30, 2025 am 09:03 AMCertainly! Here's the pseudo-original version of your text:
Today I'll share with you a method to keep duplicate entries from showing up in a column within your Excel worksheet. This trick works across Microsoft Excel 365, 2021, 2019, 2016, and earlier versions.
In one of our prior articles, we touched upon a related subject. As such, you might already be familiar with how to automatically flag duplicates once they're inputted.
This piece will guide you through preventing duplicates from cropping up in one or multiple columns in your Excel sheet. This ensures that only unique data resides in the initial column of your table—whether it’s invoice numbers, stock keeping units, or dates, ensuring each appears solely once.
How to Prevent Duplication - 5 Simple Steps
Excel boasts a tool known as Data Validation, which often goes overlooked but is quite powerful. Using this tool helps sidestep errors in your records. In upcoming articles, we’ll explore this feature further. For now, here’s a straightforward example to illustrate its usage.
Let’s assume you’ve got a worksheet titled "Customers," containing columns for Names, Phone numbers, and Emails used for distributing newsletters. Therefore, all email addresses must be distinct. Follow these steps to ensure no messages go out to the same client twice.
If needed, locate and eliminate any duplicates present in the table. You can either highlight the duplicates manually by reviewing the values or use the Duplicate Remover add-in to remove them all at once.
-
Highlight the entire column where duplicates are to be avoided. Start by clicking the first cell with data while holding the Shift key, then select the last cell. Alternatively, press Ctrl Shift End. It’s crucial to begin with the first data cell.
Note: If your data reside in a basic Excel range rather than a complete Excel table, make sure to select all the cells in your column, including blanks, from D2 to D1048576.
Navigate to the Excel "Data" tab and click on the Data Validation icon to open the dialog box.
-
On the Settings tab, pick "Custom" from the Allow dropdown list and insert
=COUNTIF($D:$D,D2)=1
into the Formula box.Here, $D:$D represent the addresses of the first and last cells in your column. Notice the dollar signs indicating absolute references. D2 is the address of the first selected cell, which isn’t an absolute reference.
Through this formula, Excel counts how many times the D2 value occurs in the range D1:D1048576. If it appears just once, all is well. If the same value shows up multiple times, Excel will display an alert message featuring the text you specify under the "Error alert" tab.
Tip: You can compare your column against another column to spot duplicates. The second column could be located on a separate worksheet or even a different workbook. For instance, you can match the current column with a list of blacklisted emails for clients you no longer wish to engage with. I’ll delve deeper into this Data Validation option in a future post.
-
Move to the "Error alert" tab and fill in the fields Title and Error message. Once you attempt to input a duplicate entry into the column, Excel will display this text. Aim for clarity and accuracy in your description to avoid confusion later. For example: Title: "Duplicate email entry" Message: "You’ve entered an email address that already exists in this column. Only unique emails are permitted."
-
Hit OK to close the "Data validation" dialog. From now on, whenever you try pasting an address already present in the column, you’ll receive an error message with your custom text. The rule applies whether you’re entering a new address for a fresh client or replacing an email for an existing one:
Exceptions to the "No Duplicates Allowed" Rule
On the fourth step, opt for Warning or Information from the Style menu list. The alert message’s behavior will adjust accordingly:
Warning: The dialog buttons will change to Yes / No / Cancel. Clicking Yes adds the entered value. Choosing No or Cancel returns you to editing the cell. No is the default selection.
Information: The alert message buttons become Ok and Cancel. Clicking Ok (the default) adds the duplicate. Cancel reverts you to editing mode.
Note: Remember, the duplicate entry alert appears solely when you attempt to input a value into a cell. Excel won’t detect existing duplicates when configuring the Data Validation tool. Even if there are over 150 duplicates in your column, this won’t occur. :).
The images remain unchanged and are referenced by their original links.
The above is the detailed content of How to prevent duplicate entries in Excel column, only unique data allowed.. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MicrosoftTeams’freeversionlimitsmeetingsto60minutes.1.Thisappliestomeetingswithexternalparticipantsorwithinanorganization.2.Thelimitdoesnotaffectinternalmeetingswhereallusersareunderthesameorganization.3.Workaroundsincludeendingandrestartingthemeetin

Grouping by month in Excel Pivot Table requires you to make sure that the date is formatted correctly, then insert the Pivot Table and add the date field, and finally right-click the group to select "Month" aggregation. If you encounter problems, check whether it is a standard date format and the data range are reasonable, and adjust the number format to correctly display the month.

Quick Links Check the File's AutoSave Status

The tutorial shows how to toggle light and dark mode in different Outlook applications, and how to keep a white reading pane in black theme. If you frequently work with your email late at night, Outlook dark mode can reduce eye strain and

To set up the repeating headers per page when Excel prints, use the "Top Title Row" feature. Specific steps: 1. Open the Excel file and click the "Page Layout" tab; 2. Click the "Print Title" button; 3. Select "Top Title Line" in the pop-up window and select the line to be repeated (such as line 1); 4. Click "OK" to complete the settings. Notes include: only visible effects when printing preview or actual printing, avoid selecting too many title lines to affect the display of the text, different worksheets need to be set separately, ExcelOnline does not support this function, requires local version, Mac version operation is similar, but the interface is slightly different.

It's common to want to take a screenshot on a PC. If you're not using a third-party tool, you can do it manually. The most obvious way is to Hit the Prt Sc button/or Print Scrn button (print screen key), which will grab the entire PC screen. You do

MicrosoftTeamsrecordingsarestoredinthecloud,typicallyinOneDriveorSharePoint.1.Recordingsusuallysavetotheinitiator’sOneDriveina“Recordings”folderunder“Content.”2.Forlargermeetingsorwebinars,filesmaygototheorganizer’sOneDriveoraSharePointsitelinkedtoaT

Finding the second largest value in Excel can be implemented by LARGE function. The formula is =LARGE(range,2), where range is the data area; if the maximum value appears repeatedly and all maximum values ??need to be excluded and the second maximum value is found, you can use the array formula =MAX(IF(rangeMAX(range),range)), and the old version of Excel needs to be executed by Ctrl Shift Enter; for users who are not familiar with formulas, you can also manually search by sorting the data in descending order and viewing the second cell, but this method will change the order of the original data. It is recommended to copy the data first and then operate.
