function with 'contain'

L

lucas

Hi Guys,

If e.g. in cell A1 I have following text 'Adam has 7 apples' is there any
formual that would return in e.g. cell A2 '1' or 'true' or whatever if A1 has
contains word 'Adam'. So in other words I'm looking for sth like this: = if
A1 contains 'Adam' then in A2 return 1; if not then return 0.

lucas
 
B

Bob Phillips

=ISNUMBER(FIND("Adam"),A1)

will return TRUE or FALSE

=--ISNUMBER(FIND("Adam"),A1)

will return 1 or 0

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
B

Bob Phillips

BTW, use

=--ISNUMBER(SEARCH("Adam",A1))

if you don't need case-sensitive

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
L

lucas

thx Bob!

Bob Phillips said:
BTW, use

=--ISNUMBER(SEARCH("Adam",A1))

if you don't need case-sensitive

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top