View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default can i prevent duplications in cells

Hi!

You can use Data Validation for this.

Assume the range in question is A1:A5.

Select that range, A1:A5.
Goto DataValidation
Allow: Custom
Formula: =COUNTIF(A$1:A$5,A1)<2

You can create your own custom error message if you want by clicking on the
Error Alert tab.

Biff

"Jackie" wrote in message
...
I am creating lists in Excel and I don't want information to be duplicated,
can I use a forlmula to prevent this?
A bit like a primary key in databases