Excel - If(cell) "contains" certain words...

Asked By TiChNi on 03-May-08 06:16 PM
Certainly there is a simple way to find out if a cell that has text in
it contains a certain word.  For example, cell A1 is populated with
the words "Houston, TX, USA."   In Cell A2 I want a function that can
look into A1 to see if the word "Houston" is contained in there.  If
it is, I would have the function return a value or some other

If only there were a symbol for "contains" if would be a breeze.
=If(A1[symbol]"Houston",1,0).  Who has the answer to this?




JE McGimpsey replied on 02-May-08 05:58 PM
One way:

=--COUNTIF(A1,"*Houston*")

In article
Pete_UK replied on 03-May-08 06:16 PM
Another way:

=3DIF(ISNUMBER(SEARCH("Houston",A1)),"yes","no")

SEARCH is not case sensitive - use FIND instead if you need this.

Hope this helps.

Pete