by edwardsantiago » Wed Mar 30, 2016 3:30 am
First, name the cells in the first column:
Select cells A2:A3
Click in the Name Box, to the left of the Formula Bar, and type a one-word name for the range, e.g. EmpIDs
Press the Enter key, to complete the naming.
Add the Data Validation:
Select cells A2:A3
On the Ribbon's Data tab, click Data Validation
On the Settings tab, from the Allow drop down, choose: Custom
NOTE: If there could be blank cells in the column, remove the check mark from "Ignore Blank Cells", or duplicates will be allowed
In the formula box, you'll use the COUNTIF function to check value being entered in cell A2. It will be compared to all the entries in the EmpID column. To prevent duplicates, the count must be 1 or 0:
=COUNTIF(EmpIDs,A2) <= 1