Dropping the clng alone won't do if your A1:A100 contains a mix of numbers
and text (where cells have real numbers stored as numbers).
If that is the case, see my suggestion.
--
Regards,
Tom Ogilvy
"Dave Peterson" wrote in message
...
CLng() converts the numeric string to real numbers.
If you drop that from your statement, you'll be looking for a text match:
ans = Application.Match(TextBox2.Text, Range("A1:A100"), 0)
Greg wrote:
How do I change this to lookup a word in the range i specified. It
works
with numbers but not letters
ans = Application.Match(CLng(TextBox2.Text), Range("A1:A100"), 0)
Thanks in advance
Greg
--
Dave Peterson
|