LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default Count Longest Consecutive Sequence of zeros

Hi Sam,

A simple working solution to your problem is to use a helper
column. With your sample data in A2:A40 then
=IF(A2=A1,B1+1,1) placed in B2 and dragged down to B40
and in C1 put =MAX(B2:B40)

That is a very simple workable solution to the problem that many
spreadsheet designers would use yet you don't want helper columns
and drag downs which leads me me to believe that you are trying to
solve a problem in a competition or the like.

If that is the case then do your own dirty work.

My apologies if my assumption is incorrect
Martin




"Sam via OfficeKB.com" <u4102@uwe wrote in message
news:85cf16d429f75@uwe...
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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find longest consecutive winning streaks trey1982 Excel Worksheet Functions 7 December 10th 07 06:42 PM
Finding the longest sequence of 0's in a row MJW[_2_] Excel Worksheet Functions 7 November 30th 07 09:08 PM
Counting number of consecutive zeros at the end of a list [email protected] Excel Discussion (Misc queries) 2 September 22nd 05 12:47 PM
Average, Excluding Zeros, Non-Consecutive Range Coal Miner Excel Discussion (Misc queries) 9 August 4th 05 10:21 PM
Inventory numbers - Consecutive, but out of sequence crazybass2 Excel Discussion (Misc queries) 4 December 7th 04 12:49 AM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"