View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default String of data in a cell. Want to use 'contains' in an 'if' statem

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


"Andrew" wrote:

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.