Duplicate Entries

L

Laurynne

I've started a database in Excel listing simply names and Social Sec.
numbers. I tried using the COUNTIF function to prevent against
entering the same Soc Nr twice. Unfortunately, I'm getting the error
message apparently because Excel is recognizing just a _part_ of the
soc. nr. as being a duplicate entry. How do I make certain that Excel
will only recognize an error if the entire number is entered again?
This is EXTREMELY frustrating. I'd appreciate ANY help. Thanks!
 
G

Gary H

This may not be the answer you are looking for but...
Why not use Access for your database? After all, it is a
database program, Excel is not. I hope this doesn't
sound harsh, it is not meant to be! :)
 
T

Taiariol

Here's what I do, I hope this helps:

under "A" column for example, select cell A1 and go
to "conditional formating", under "formula is" enter:
=COUNTIF(A:A,A1)>1 and set the condition to change the
text red (for example), now just copy down as many rows as
required.
 
C

Cliff Myers

Laurynne,
Click Data then validation, on the settings tab, select custom for allow and
then put this formula in the formula box, change the cell references to your
range.
=Countif($A$1:$A$50,A1)=1, then click the error alert tab and set up your
warning, then click okay. Making sure that you set this up in your first
cell, click copy and then paste into your range of cells under your first
cell.
You can see an example of the above code by clicking this link:
http://www.cpearson.com/excel/NoDupEntry.htm
HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top