View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Domenic Domenic is offline
external usenet poster
 
Posts: 256
Default Counting the largest number of consecutive 1's in a column

By formula...

=MAX(FREQUENCY(IF(A2:A1000=1,ROW(A2:A1000)),IF(A2: A1000<1,ROW(A2:A1000))
))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"DavidS" wrote:

Hello, I have a column with 1000+ rows, each row having a 0 or 1. I'm
looking for a formula that will give me the highest number of consecutive
1's in the entire column. Just in case I didn't explain this correctly, here
is an example with a column fragment laid sideways:
0101100001111000111110010101. In this example the formula was produce a
result of 5. I'm not sure if this is possible. Thanks for your help, David