Contains Text

  • Thread starter Thread starter DR
  • Start date Start date
D

DR

How do I get an if statement to return true if a cell contains a text string
rather than its being entirely composed of the string? Thanks
 
Hi
not quite sure what you're trying to check. Could you post an example
as plain text.
Maybe the functions
ISNUMBER
or
ISTEXT
are what you're looking for
 
One way:

=IF(ISERROR(SEARCH("*text*",G22)),"not found","found")

Change the text to whatever you want to look for

Regards

Trevor
 
A bit awkward, but:

=AND(NOT(ISERROR(FIND("mystring",A1))),LEN(A1)>LEN("mystring"))
 
Thanks. I'm just trying (Excel 2000) to get a true if the cell text says
"one two" where I say
IF (A1="*two*", something, something else)
It seems not to like that syntax and is giving me the false result
 
Hi
the function ISNUMBEr only checks if FIND does find your text string.
You could also use the same formula with
=IF(ISNUMBER(FIND("mytexttosearchincell_A1",A1)),"something","something
else")
 
Did you try my proposed solution?

--

Vasant

DR said:
Thanks. I'm just trying (Excel 2000) to get a true if the cell text says
"one two" where I say
IF (A1="*two*", something, something else)
It seems not to like that syntax and is giving me the false result
 
Back
Top