Hi Crystalyzer & Peter,

I realized after I sent it, my formula has more than ones and zeros. I'm trying to find out how often a stock alternate between an up and a down day. Column B is the price. Column C formula is: =IF(B2<b1,c2+1,0). column="" d="" should="" calculate="" the="" alternate="" streak.

<b1,c2+1,0). i="" need="" column="" d="" to="" calculate="" the="" alternate="" streak.=""

<b1,c2+1,0). i="" need="" column="" d="" to="" calculate="" the="" alternate="" days="" streak.="" hopefully="" this="" clarifies="" it="" much="" better.

Thanks again!

B C D

1 | 299.7 | | |

2 | 298.28 | 1 | |

3 | 298.21 | 2 | |

4 | 295.87 | 3 | |

5 | 297.62 | 0 | |

6 | 297 | 1 | |

7 | 295.4 | 2 | |

8 | 296.77 | 0 | |

9 | 293.24 | 1 | |

10 | 288.06 | 2 | |

11 | 290.42 | 0 | |

12 | 294.35 | 0 | |

13 | 293.08 | 1 | |

14 | 288.53 | 2 | |

15 | 291.27 | 0 | |

16 | 293.24 | 0 | |

17 | 296.28 | 0 | |

18 | 295.95 | 1 | |

19 | 298.88 | 0 | |

20 | 298.4 | 1 | |

21 | 299.28 | 0 | |

22 | 297.97 | 1 | |

23 | 300.03 | 0 | |

24 | 298.99 | 1 | |

<tbody>

</tbody>

Put this formula in Cell D2 and copy it down the column

=IF(C2<>C1,D1+1,0)

It will accumulate all the alternate 1 & 0 combinations until there is a duplicate and then enter zero and start over.

</b1,c2+1,0).></b1,c2+1,0).></b1,c2+1,0).>