How to find a particular word?

J

Jack

Hello, everybody!

I have a dictionary that I created in excel and that is becoming too large
to find particular words. I have one problem with finding. I want to find,
for example, 'vision,' but it finds all words containing 'vision,' i.e.
division, divisional, visionary, provision, etc. What I need is that I want
to find only the word 'vision' in order not to waste time, finding unrelated
words, as mentioned above.

Is there any solution to it? Please help me.

Thanks in advance.
Jack
 
J

Jacob Skaria

If you are looking for a word match within a cell then add a space at the
beginning and end
Find what: ' Vision '


If this post helps click Yes
 
R

Ron Rosenfeld

Wonderful It does work. Thanks a lot for your help.

You're welcome. Glad to help. Thanks for the feedback.

This message seems as if you are responding to my original macro post. If that
is the case, please see my revision which gracefully handles the instance where
the word (or phrase) being searched for is not found at all.

--ron
 
R

Ron Rosenfeld

Ron's macro works fine, so I'm glad you found a solution that works for you;
but I'm curious... can you see my response to your original question which
contains code that should also work for you? I posted it at least a
half-hour before Ron asked you for clarification on what you were trying to
search for and see no follow ups to it by you, so I'm just wondering if you
can even see my original message to you or not?

It's interesting. I can see your macro, and your revision. But in other
threads, in this and other MS newsgroups, which I access via the
msnews.microsoft.com news server, I know that I don't see some messages. I can
tell this by seeing people responding to messages which I never see, but can
sometimes find accessing the NG using a different method.

One functional difference between yours and mine, is that your search range is
limited to a single column, whereas mine encompasses the entire sheet. Of
course, either could be changed if the OP found it necessary.
--ron
 
J

Jack

Well, your revision did not work for me, but the first option was great. It
works without any problem.
 
R

Rick Rothstein

One functional difference between yours and mine, is that your search
range is
limited to a single column, whereas mine encompasses the entire sheet. Of
course, either could be changed if the OP found it necessary.

The only reason I restricted my search to a single column is because in the
OP first response to you he indicated that the words he wanted to search for
were in Column B. I'm guessing he doesn't have words in other columns that
he could "accidentally" find using your code. As you said, though, either of
our routines can be modified to handle whatever range is needed to be
searched in.
 
R

Ron Rosenfeld

Well, your revision did not work for me, but the first option was great. It
works without any problem.

Something is strange about that. The only difference is a bit of code to
handle the instance where the word you are searching for is not present.

The additional lines are about 15 lines up from the bottom:

========================
If i = 0 Then
MsgBox (" """ & w & """ not found")
Exit Sub
End If
=========================

Are you certain you copied the revision correctly?
What does "did not work" mean? What happens with a "found" word and when you
use a word that is not present?
--ron
 

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

Top