View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Count consecutive characters within a cell

assume your data in A1

Create a lookup list
A5= AAAA
A6= CCCC
A7= GGGG
A8= TTTT

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(A5:A8,A1))))0,"yes","no")


"Jshendel" wrote:

I have a genetic sequence such as:
AATTCAGTTACTTTTGCA

I need a formula that will tell me if this cell has a run of 4 or more
consecutive letters. The run can consist of 4 or more A, T, C, or G.

The above example can return simply as "yes" or can be as complex as "this
cell has 4 consecutive T's"

Thanks,
Josh