Thread: validation
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default validation

Raymond,

You can have a macro if you want but you don't need one.

Select column A then
Data|Validation
Select Custom
Enter the formula
=COUNTIF(A:A,A1)<2

On the 'Error Alert' tab enter a heading and suitable text.
Click OK

Mike


"Raymond Chiu" wrote:

(1) I input records in the worksheet
(2) When I input in column A of any row (e.g. invno), it will check whether
the values exist in the column A of all rows, it yes, show dialog that
duplicate record.
(3) the coding should put on the lost focus event of cells in column A