Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an excel spreadsheet - is it possible to have validation so that a column cannot contain a value that already exists in the column?

share|improve this question
    
@DaveParillo - aiming for the Taxonomist badge, are you ? :)) –  ldigas Oct 21 '09 at 20:22

1 Answer 1

up vote 5 down vote accepted

Yes, from this example ...

  1. Select a range of cells, for example, A2:A20.
  2. Select Data -> Data Validation (in Data Tools Group).
  3. In Data Validation dialog box, select Settings -> Allow -> Custom.
  4. In the Formula box, enter the following formula: =COUNTIF($A$2:$A$20,A2)=1
  5. Select the Error Alert tab.
  6. In the Title box, enter: Duplicate Entry.
  7. In the Error message box, enter: The value you entered already appears in the list above.
  8. Click OK.
share|improve this answer
    
Perfect, thanks –  Jason Jul 23 '09 at 22:48
    
Sure -- glad to help! –  JP Alioto Jul 23 '09 at 22:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.