Allow only unique values in Excel
Written by Armywil   
Monday, 27 November 2006

Excel Excel is a rich software with full options; we can use it for several uses, in the home's management too; in this article we'll explain how to setup excel to accept unique values in a column and keep out duplicate numbers....  

 

Message window Suppose you want all the numbers in column A to be unique. Start by clicking in cell A1 and selecting Data\Validation from the menu. Click the drop-down list that is titled Allow and select Custom from the list. A box titled Formula will appear; enter this formula: =COUNTIF(A: A, Al )=1. Now click the Error Alert tab and enter an appropriate title and error message. For example, you could set the title to "Unique Values Only" and the message to "You must enter a value that is not already present in this column." Then click OK to accept the validation rule.

Now click the heading for column A to select the entire column. Again select Data\Validation from the menu. Excel will ask if you want to extend data validation to the additional cells. Click Yes, click OK, and you're done.
If you accidentally attempt to enter a nonunique value in column A, Excel will block it and display the error message you defined.

Last Updated ( Monday, 27 November 2006 )