countif maximum number

B

Brian

I have values in cells B2:B22. I would like a formula that will count the
number of consecutive cells that B2 is greater than.
Example:
B2,B3,B4,B5...
12,10,9,8,13... This example would reveal "4".
11,12,10,9,8,13... = 0
14,11,12,10,9,8,13...= 7

Thanks
 
J

Jason Morin

You could put this in C2 and fill down. Then use =MAX
(C2:C22).

=IF(B3<$B$2,1+C2)

This formula does *not* count B2 as your 1st and 3rd
examples do.

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top