View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default How to count the maximum number of consecutives?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"JP" wrote in message
...
I finally understand how this is working. It's a brilliant and elegant
solution that is greatly appreciated. Thanks once again, Biff and happy
trails.

JP


"T. Valko" wrote:

Try this array formula** :

=MAX(FREQUENCY(IF(A1:A11<0,ROW(A1:A11)),IF(A1:A11 =0,IF(A1:A11<"",ROW(A1:A11)))))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"JP" wrote in message
...
I need to determine the maximum number of consecutive negative numbers
in a
column. The column contains formulas that evaluate to a positive
number,
a
negative number, zero or "" (blank). I cannot add an additional
column.
The
following are the results of formulas in cells A1:A11 that need a
formula
in
A12 that evaluates to 3, the maximum number of consecutive negative
numbers
counting cells A2, A6 and A7.

1
-2
""
""
""
-6
-7
8
-9
""
-11



.