Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting Consecutive Numbers
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting Consecutive Numbers
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" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting Consecutive Numbers
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting consecutive negative value | Excel Worksheet Functions | |||
Counting strings of consecutive numbers in a column | Excel Discussion (Misc queries) | |||
Counting consecutive numbers in a list | Excel Worksheet Functions | |||
Counting Consecutive Numbers in a List | Excel Worksheet Functions | |||
Counting consecutive numbers in a list | Excel Worksheet Functions |