View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default String of data in a cell. Want to use 'contains' in an 'if' statem

Hi Andrew:

If InStr(cellvalue,x)0 Then
MSGBOX("Y")
else
MSGBOX("N")
endif


--
Gary's Student
gsnu200705


"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.