View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Dave is offline
external usenet poster
 
Posts: 1,388
Default Count Longest Consecutive Sequence of zeros

Hi,
One way:
If your given data is A1:A39
In B1 enter =IF(A1=0,1,"")
In B2 enter =IF(AND(ISNUMBER(B1),A2=0),B1+1,IF(A2=0,1,""))
Select B2 and copy down to the end of your data.
Then in another cell:
=MAX(B1:B39)

Regards - Dave.