Prevent Duplication

August

Active Member
Joined
Jun 18, 2004
Messages
268
Is there a way to prevent someone entering a duplicate number/text entry in a range of cells in a spread sheet. If not to prevent them, then display a message, as in a validated list, that the entry they are trying to make is a duplicate.


Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Select the entire column (say col A).

In Data Vaidation|Custom, enter the formula:

=COUNTIF(A:A,A1)<=1

Modify the error message to your liking.
 
Upvote 0
Works perfectly, but I don't understand how!!!!
Usually I can see how solutions work (even if I could never think of them myself)

Thanks
 
Upvote 0
Got to some cells of the column and check th data validation formula. The `A1' part would have changed to that cell reference. What this means is that the validation criteria is checking if there are more entries in the column that match the current cell entry.
 
Upvote 0
If I may expand on this subject -
You tip is wonderful for cells where the data is "typed in".
Is it possible to do this and use a pulldown list at the same time?
 
Upvote 0
psitaram said:
Got to some cells of the column and check th data validation formula. The `A1' part would have changed to that cell reference. What this means is that the validation criteria is checking if there are more entries in the column that match the current cell entry.

How would you do this for more than one column?
 
Upvote 0

Forum statistics

Threads
1,203,242
Messages
6,054,350
Members
444,718
Latest member
r0nster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top