Counting the number of specified text characters within a cell
You could use something like this:
=LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))
This would give you the number of "a"s.
To get the numbers of "c"s and "g"s together, you could use:
=LEN(A1)*2-LEN(SUBSTITUTE(A1,"c",""))-LEN(SUBSTITUTE(A1,"g",""))
Basically, these formulas just compare the length (# of characters) of the
original sequence to the length of the sequence without the specified
letter(s).
HTH,
Elkar
"FlipperT" wrote:
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.
|