View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Laura Cook Laura Cook is offline
external usenet poster
 
Posts: 10
Default Counting the number of specified text characters within a cell

If case does not matter:

=LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))
or
=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,"c",""),"g",""))

If case does matter:

=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,"A",""),"a",""))
or
=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1 ,"C",""),"c",""),"G",""),"g",""))

--
HTH,
Laura Cook
Neenah, WI


"FlipperT" wrote in message
...
I work in a genetics lab and would like to know of a function that will
count
the nucleotide designators within a cell. Say I am ordering a primer, and
have this sequence in a cell: ataacgctttaggg Is there a function that
will
tell I have 4 'a's in that cell. Or is there a function that will tell me
that I have 6 (c's and g's) in the cell.