ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding text (https://www.excelbanter.com/excel-programming/307444-finding-text.html)

Fish

finding text
 
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

Paul Lautman

finding text
 
=FIND("123",cell)

"Fish" wrote in message
...
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




Don Guillett[_4_]

finding text
 
Will this work?
=RIGHT(D4,LEN(D4)-FIND(123,D4)+1)

--
Don Guillett
SalesAid Software

"Fish" wrote in message
...
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




Tom Ogilvy

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

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

--
Regards,
Tom Ogilvy

"Fish" wrote in message
...
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




Tom Ogilvy

finding text
 
I guess you wanted a worksheet formula

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

is another to add to the collection.

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
if instr(1,cell,"123",vbTextCompare) 0 then
msgbox "contains 123"
End if

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

--
Regards,
Tom Ogilvy

"Fish" wrote in message
...
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







All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com