View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ilford3200@gmail.com is offline
external usenet poster
 
Posts: 5
Default Need formula to calculate the average number of consecutive cells

Hello!

I have a column in Excel consisting of 1's and 0's. I need to
calculate the average size of consecutive cells (groups of cells)
containing 1's.

For example, the average size of consecutive cells containing the
number 1 in the following array is 3 (i.e., (2+4+3+3)/4 = 3):

1100111100000011100011100000


Can someone *please* suggest a formula to do this?

Thanks in advance!

Ilford