View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveC
 
Posts: n/a
Default Using Countif to Count Consecutive Relative Increases in Numbe

Hi, it works great as is. Thank you!

As a follow up, how could I expand it to 8 columns A through H?

And if you have time, how do you go about the process of creating all these
nested functions... I tried it a few times and screwed it up.

Thanks so much!


"JLatham" wrote:

This should do it for you, at least it works with your test cases.
Enter the formula out in column E, then extend the formula down the sheet
this assumes your first row is at 2
=IF(A2B2,1,0)+IF(C2<B2,IF(A2B2,1,0),0)+IF(B2C2, IF(A2B2,1,0),0)+IF(C2D2,IF(B2C2,IF(A2B2,1,0),0 ),0)

JLatham

"SteveC" wrote:

Col A through D contain the data. Col E contains the formula I'm asking
about:
Col A Col B Col C Col D Col E
7 6 7 2 1
4 3 2 1 4
8 10 9 8 -
5 3 2 10 3

I'd like to Col E to count consecutive improvements for each row of data
starting in Col A relative to Col B, then Col B relative to Col C.

Is there a way to do this?

Thanks a lot!