What doesthe IFERROR formula you posted do?

The current formula IFERROR count after the last value of row where Y=3, from down to up till new Y=3 to reset.

Example how my IFERROR work at this moment:

Column Y

Row 1 0 (value) here, my formula have value 4

Row 2 1 (value)

Row 3 2 (value)

Row 4 1 (value) my formula start count from here till new 3 value insert

Row 5 3 (value) my formula will reset here (value 0)

Row 6 2 (value)

But, I want add as I said, 2 new condition for this, I want to count as you can see little up + Column with time value, the formula must compare column with time value.

So, I want to respect the current condition of IFERROR + $C>=09:00 and $C<=20:55

The formula will reset value as you see, if the value of column Y are 3, so, I want from this point, if value 3 inserted in column Y, to compare thr same row of column C. Example: If $Y$1=3 & $C$1=21:00-22:00, formula will reset value in cell that formula exist.

Thanks for response.

Best Regards!