View Single Post
  #2   Report Post  
neopolitan
 
Posts: n/a
Default How do I prevent duplicate data in Excel?


If you are entering data in one row across several columns and you want
to prevent duplicates from being entered in that one row (Assume Row 2
for this example):

Select the row, then click on DataValidation and select "Custom" in
the dropdown list in the "Settings" tab. Then enter this formula in
the "Formula" window: =COUNTIF(2:2,A$2)<=1 .

Now an error message pops up whenever the user attempts to enter the
same data twice in Row 2.

If you want to prevent duplicates in a column (Assume Col A) instead
of a row then the formula to enter is: =COUNTIF(A:A,$A1)<=1 .


--
neopolitan


------------------------------------------------------------------------
neopolitan's Profile: http://www.excelforum.com/member.php...nfo&userid=611
View this thread: http://www.excelforum.com/showthread...hreadid=477458