View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Count Longest Consecutive Sequence of zeros

Hi,

Try this array entered with CTRL+Shift+Enter

=MAX(FREQUENCY(IF(A1:A30=0,COLUMN(A1:A30)),IF(A1:A 30<0,COLUMN(A1:A30))))

Note if you have blanks they will evaluate as zero

Mike

"Sam via OfficeKB.com" wrote:

Hi All,

I have a single column, dynamic named range called "Data" that contains
numeric values.

Is it possible without the use of a helper column (or other fill down) to
provide a formula that can count the longest consecutive sequence of zeros in
"Data" and return that count to a single cell.

Sample Data Layout:
1
2
0
0
1
2
3
0
1
0
1
2
0
0
0
0
1
2
0
0
1
2
0
1
2
0
0
0
0
0
0
0
0
0
1
0
0
1
0


Expected Result:
Longest consecutive sequence of zeros is 9.

Thanks
Sam

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200806/1