I have modified the data in this file and would like to enhance the search capability.
Currently the search looks for the string anywhere in the data field.
I would like to have a checkbox called "Whole words" which, when unchecked, works just as it does now.
When the checkbox is checked the search should look at whole words or numbers. So that ro would match Rory and not broomee. I think the delimeters for a word or number should be
space
comma
hyphen
I wouldn't call that a Whole word match but more a beginning of word match
I agree but what I wanted was something short to write in there.
Thanks, looks good now.
Saqib Husain
ASKER
HI, again, I just discovered that the underscore is not considered a word separator. I cannot pick Chris_Bottomley by typing B. Can you do something about it?
Robert Schutt
Yes sure, couple of options. In the userform code (line 19) you could specify "standard word boundary or underscore":
The comment there shows the alternative I mentioned earlier where you only allow the exact characters you want. Just make sure the "-" is the first or last character within the range (block quotes) because otherwise it changes the meaning to a range of characters.
I agree but what I wanted was something short to write in there.
Thanks, looks good now.