String of data in a cell. Want to use 'contains' in an 'if' statem

A

Andrew

Is there a way of writing the following?

=if ( cell 'contains' x , then write "y" , else write "n" )
The cell contains text.

Suggestions appreciated, thanks.
 
B

Bob Phillips

=IF(ISNUMBER(FIND("x",A1)),"y","n")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Ron Coderre

Try something like this:

For a value (or blank) in A1

This formula tests if A1 contains the letter "x"
B1: =IF(COUNTIF(A1,"*x*"),"y","n")


Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Top