if isnumeric(Textbox2.Text) then
ans = Application.Match(CLng(TextBox2.Text), Range("A1:A100"), 0)
else
ans = Application.Match(TextBox2.Text, Range("A1:A100"), 0)
End if
--
Regards,
Tom Ogilvy
"Greg" wrote in message
...
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
|