IF with text

W

wayne

I'm trying to write an statement that will search a cell
for part of a string containing "brick". ie the next four
lines each contain "brick" and i need to return a result.

brick
Bricks
some bricks
and bricks in packs


I've tried.... =IF(A1="*brick*,"yes","no") etc with no
luck....

Anyone got any ideas?????
 
F

Frank Kabel

Hi
one way:
=IF(ISNUMBER(SEARCH("brick",A1)),"yes","no")

or try
=IF(COUNTIF(A1,"*brick*"),"yes","no")
 
R

Raj

Hi Wayne

I guess you can use this formulae
Under the assumption you are looking for brick in A1 then
=IF(ISERROR(FIND("brick",A1)),"",Desired Result)

This should fulfil your requirement.

Regards
 
Top