Ad - leaderboard

Tuesday, January 11, 2011

Restrict duplicate data using Excel Validation

This is a nice little trick that shows how to adapt of Excel.
To apply a validation rule that restricts input values to only unique values, do the following:

  1. Select A2:A8 (the cells you’re applying the rule to).
  2. 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.
  3. Choose Custom from the Allow dropdown list.
  4. 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