To apply a validation rule that restricts input values to only unique values, do the following:
- Select A2:A8 (the cells you’re applying the rule to).
- Choose Validation from the Data menu and click the Settings tab. In Excel 2007/2010, click the Data tab and choose Data Validation from the Data Validation dropdown in the Data Tools group.
- Choose Custom from the Allow dropdown list.
- The Custom option requires a formula that returns True or False. In the Formula field, enter the following expression: =COUNTIF($A$2:$A$8,A2)=1.
Restrict duplicate data using Excel Validation | Microsoft Office | TechRepublic.com