Excel validation - can it be used to make sure duplicates are not entered?

2

2

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?

Jason

Posted 2009-07-23T21:48:06.247

Reputation: 1 029

@DaveParillo - aiming for the Taxonomist badge, are you ? :)) – Rook – 2009-10-21T20:22:45.287

Answers

5

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.

JP Alioto

Posted 2009-07-23T21:48:06.247

Reputation: 6 278