+ Reply to Thread
Results 1 to 7 of 7

suggest correct spelling

  1. #1
    Registered User
    Join Date
    10-28-2003
    Posts
    21

    suggest correct spelling

    I have a file that caters to a coddled group that can't be bothered to think much.

    The file has a userform that allows them to input a name. I need to find an associated ID number for the name from a database. the problem is names are being missspeled . I can't use validation because when the name is misspelled the user can't be bothered to scroll through the huge list of names.

    I'm wondering if there is code I could use that would work something like when you misspell in a google search. It would look at the input, then compare to the database and suggest which names the user might have meant.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    If your form is using a combobox, then when they start to type it will go to the nearest name match as they type. So if you have a list of names (toady, tom, tony), and they type to it will show toady. If the then type tob it won't bring back any match, so the user will know that they have started to mistype. Back one character, and select the dropdown will have them in the names that start with to

    Does that help???

    rylo

  3. #3
    Registered User
    Join Date
    10-28-2003
    Posts
    21
    Quote Originally Posted by rylo
    Hi

    If your form is using a combobox, then when they start to type it will go to the nearest name match as they type. So if you have a list of names (toady, tom, tony), and they type to it will show toady. If the then type tob it won't bring back any match, so the user will know that they have started to mistype. Back one character, and select the dropdown will have them in the names that start with to

    Does that help???

    rylo
    Unfortunately no. The other issue is many of the names are Hispanic and have the double last name, but some go by only the 2nd name, which wouldn't show up in this instance. Again, I know the straightforward things would work easily, but I can't require the user to do anything other than pick from a very short list of possibilities.

    I'm thinking I could probably write something that if there is not a match goes through and analyzes each character to see the number of character matches and the number of characters in the correct spot to see which would be the closest match; however, I don't want to re-invent the wheel...

    Thanks anyways!

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Go to one of the search engines and do a search on something like fuzzy logic excel.

    I've seen a couple of posts around that may give you some idea on how to proceed.

    I'm pretty sure that mrexcel.com has something so in google put in

    fuzzy logic site:mrexcel.com

    and see what you get back.


    rylo

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    the user can't be bothered
    well tough make them!
    i still think data validation from a list is the way to go
    so it brings up a message "invalid name,please select from drop down"
    make sure you sort your list then its not really that hard to scroll to the correct one

  6. #6
    Registered User
    Join Date
    10-28-2003
    Posts
    21
    Quote Originally Posted by rylo
    Hi

    Go to one of the search engines and do a search on something like fuzzy logic excel.

    I've seen a couple of posts around that may give you some idea on how to proceed.

    I'm pretty sure that mrexcel.com has something so in google put in

    fuzzy logic site:mrexcel.com

    and see what you get back.


    rylo

    Yes, I think fuzzy logic is what I'm looking for. i've looked around, but no one is offering a fuzzy spell check (for free).

    I noticed that Excel DOES use fuzzy logic to give suggestions on their spell check, but I can't figure out how to access the suggestions in VBA

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Might not be able to get a fully working free option, but you may be able to adapt some of the code that is available to suit your situation.


    rylo

+ 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