IF testing for text

D

Dan E

In a formula, is there a way to to do a logical IF test on the contents of a
cell to see if the cell contents includes a known string (e.g. "TT")?
TIA

Dan
 
R

Ron Rosenfeld

In a formula, is there a way to to do a logical IF test on the contents of a
cell to see if the cell contents includes a known string (e.g. "TT")?
TIA

Dan

One way looking at the contents of A1:

=IF(ISERR(FIND("TT",A1)),"TT not present","TT present")

The above is case sensitive. For a case insensitive version, use SEARCH
instead of FIND.

You may also use a cell reference for the string being searched for.


--ron
 
R

Ragdyer

For a true or false return,
With the list in Column A,
And the string to look for entered in C1,
Enter this in B1, and drag down to copy:

=ISNUMBER(SEARCH($C$1,A1))
 
D

Dave Peterson

One more:

=if(countif(a1,"*" & "tt" & "*")>0, "foundit","not there")
or
=if(countif(a1,"*" & b1 & "*")>0, "foundit","not there")
 

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

Top