+ Reply to Thread
Results 1 to 3 of 3

Avoid Duplicate Names

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Avoid Duplicate Names

    Hi,

    I'm having at least one issue with this script below. Maybe more...the script is suppose look in Range A3:A100 for the last name that was just entered. if it finds the same name it then needs to look in Range B3:B100 at the first name, if both match a name that is already there then the cells are cleared and the user is asked to try again.

    What I found out so far is that cell that the data is entered on is always going to be in the list so it will always find a duplicate.

    I need a way to see if the name is listed more than once.

    Can someone advise?

    Thank You, Mike

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    03-01-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Avoid Duplicate Names

    Maybe you could try posting a sample workbook so the concept is clearer. I'm confused as to where exactly you are entering the last and first names.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Avoid Duplicate Names

    Hello Mike,

    It is easier and faster to use the Dictionary Object. The Dictionary allows you to randomly check if something already exists. Here is an example...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1