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
one way
=IF(ISNUMBER(FIND("two",A1)),"something","something else")
 
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
 
Works like a charm. Thanks. Can't believe there isn't something more
pedestrian in the app.
 

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