View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Text within a Cell

=isnumber(search("pdq",a1))

will return true or false

=search() ignores case
=find() is case sensitive

Another case-insensitive way:
=countif(a1,"*pdq*")0
or
=countif(a1,"*"&"pdq"&"*")0
or if the pdq is in another cell:
=countif(a1,"*"&x99&"*")0








N1KO wrote:

Hi,

I could do with either some VBA code or excel formula to find a selection of
letters (Eg. PDQ) within a cell.

The letters could be anywhere in the cell and can be of any format Eg PdQ.

I need it to return a value of 1

Cheers


--

Dave Peterson