Hello,

I'm trying to program excel to process raw tidal elevation data. I have hourly tidal elevations over a one year period and I want to know how many times a reading of over 2 feet has occurred. However, I only want to count an exceedance if another exceedance has not occurred in the previous 24 hours. I have a worksheet now with a formula next to every data point which does this, but I was wondering if there is a way to just have one formula that counts it all up in one cell.

I think the formula will involve a CountIf(), And(), and Index() functions. I guess the best way I can think to describe it right now is:

=CountIf(And(cell in column 1>value, ***) with the *** being a function which checks the previous 24 cells in that column to see if an exceedance has occurred.

I can offer more information upon request, but I'm just wondering if this is even possible.

Thanks in advance