finding text

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
 
T

Tom Ogilvy

if instr(1,cell,"123",vbTextCompare) > 0 then
msgbox "contains 123"
End if

if cell like "*123*" then
msgbox "contains 123"
End if
 
T

Tom Ogilvy

I guess you wanted a worksheet formula

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

is another to add to the collection.
 
Top