Prevent Duplicates

S

scottnshelly

I have a userform that have three textboxes. the user puts a firs
name, last name and ID number in these. when they hit the "Add
button, it adds those boxes on the first empty row. How can i mak
sure that there isn't already a row for that agent and if there is
make the changes specified on the userform.
Not sure if this question will make sense to anyone else - it make
sense to me. i can clarify if needed.
Thanks
 
J

jason

Have a look at the advanced filter function, copy to a new location.
You have a unique records only checkbox

jason
 
N

Nigel

You'll need to define what is meant by a duplicate - all fields identical or
something else eg ID numbers only - there are people with the same names!
In any event if you wish to check before the form entries populate the
worksheet, then you'll need to scan the database range testing the fields
(field) for matches, when a match is found flag to user via a control
message (label) on the userform, enable a reset option and await the users
repsonse otherwise add to the range.
Confirm what you mean by dupe and we can provide the code for the scan.

Cheers
Nigel
 
S

scottnshelly

sorry for the late response, i have been on vacation.
I would like to prevent a user from adding a duplicate ID number.
want to have first name in column A, last name in column B and ID i
column C. if the user is trying to add an ID that already exists,
want it to prevent them from adding it again, but allow them to change
i can make a userform to change the information, but i need to kno
how to prevent the duplicate ID and prompt for the change instead.
thank
 
Top