
Use the COUNTIF function to prevent duplicate
input through validation
This tip shows an easy way to prevent duplicate input in the range
A1:A100. Use the Validation option and enter a custom formula to
get the desired functionality for the specified range in a worksheet.
4
To prevent duplicate input:
1. Select cells A1:A100.
2. On the Data menu, click Validation.
3. In the Settings tab, select Custom in the Allow drop-down
box.
4. In the Formula box, type the formula
=COUNTIF($A:$A,A1)=1.
5. Select the Error Alert tab.
6. Enter a custom error message.
7. Click OK.
When a user attempts to enter duplicate data, an error message
will appear.
Note: To remove data ...