finding text

  • Thread starter Thread starter Fish
  • Start date Start date
F

Fish

Is it possible to code a find to determine if any part of
a value is in a text for instance:

=RIGHT(cell,3) xxx123 gives 123

is it possible to just code to find 123 in a text
 
if instr(1,cell,"123",vbTextCompare) > 0 then
msgbox "contains 123"
End if

if cell like "*123*" then
msgbox "contains 123"
End if
 
I guess you wanted a worksheet formula

=if(countif(cell,"*123*"),"found","not found")

is another to add to the collection.
 

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

Back
Top