PC Review


Reply
Thread Tools Rate Thread

Counting Consecutive Numbers

 
 
=?Utf-8?B?VHJhdg==?=
Guest
Posts: n/a
 
      3rd Jul 2007
I need to count consecutive numbers,


0 0 0 0 0 0 0 0 0 0 0 (ie this would = 6)

countif(range, "=0") unless there is a blank and then reset the counter.


Thanks for any help
 
Reply With Quote
 
 
 
 
Trevor Shuttleworth
Guest
Posts: n/a
 
      3rd Jul 2007
Assuming those zeros (or numbers) are in row 1 from A1 to L1:

In A2: =IF(A1="",0,1)
In B2: =IF(B1="",0,A2+1)

Then drag across from B2 to L2

Regards

Trevor


"Trav" <(E-Mail Removed)> wrote in message
news:3BDBEFC8-A2A7-4841-A932-(E-Mail Removed)...
>I need to count consecutive numbers,
>
>
> 0 0 0 0 0 0 0 0 0 0 0 (ie this would = 6)
>
> countif(range, "=0") unless there is a blank and then reset the counter.
>
>
> Thanks for any help



 
Reply With Quote
 
=?Utf-8?B?UGFwYURvcw==?=
Guest
Posts: n/a
 
      4th Jul 2007
If your data is organized in a row, try this array formula (Ctrl-Shift-Enter):

=COLUMNS(range) - MAX( NOT( ISNUMBER(range) ) * ( COLUMN(range) - CELL(
"col", range ) + 1 ) )
--
Regards,
Luc.

"Festina Lente"


"Trav" wrote:

> I need to count consecutive numbers,
>
>
> 0 0 0 0 0 0 0 0 0 0 0 (ie this would = 6)
>
> countif(range, "=0") unless there is a blank and then reset the counter.
>
>
> Thanks for any help

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting consecutive cells OM Microsoft Excel Discussion 3 31st Jul 2011 10:36 AM
Counting strings of consecutive numbers in a column SamG Microsoft Excel Misc 1 27th Jan 2010 07:25 AM
Counting consecutive numbers in a list Wiseguy91 Microsoft Excel Worksheet Functions 1 12th Jan 2010 03:52 AM
Counting Consecutive Numbers in a List Wiseguy91 Microsoft Excel Worksheet Functions 1 12th Jan 2010 03:51 AM
Counting consecutive numbers in a list Wiseguy91 Microsoft Excel Worksheet Functions 0 11th Jan 2010 11:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:08 PM.