Duplicate Names in List

  • Thread starter Thread starter Kev
  • Start date Start date
K

Kev

Searched various sites listing "Duplicate" data but I
just cannot piece it all together.
Have a UserForm to get text - "CustName" - but prior to
adding this to my customer list - range "Customers" - I
want to search for that current customer.
If it is found I want program to stop and return to
range "CustList". I have completed the code for when
there is not a duplication.

How on a command button do you set the accelerator to
be "Enter"?

Thanks for all the assistance....
Kev
 
You could use a worksheet function to check it, such as

If Worksheetfunction .COUNTIF(rng,value) > 0 Then
... it already exists

To set the accelerator, you need to set the property Default to True. The
Esc key can also be used by setting the Cancel property to True.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I have the range "Customers" set so it adjusts with each
excepted entry - as such can I use a range name in the
CountIf statement. As such how do I get CustName from
the userform textbox attributed to value in countif
statement.
What started as an easy little excel spreadsheet has me
drowning, at present, with my introduction to VBA.
Again, thanks for your time and assistance...
Kev.
 
Coming back up for another breath. I have got it working
to a point but this has raised another issue - see my
next post with code. Thanks agains.....
 

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

Back
Top