I need to identify the total penalty incurred within a 30 day period using 30 minute interval data. The 30 minute interval data values are required to be between 39-42 and if they are not a $200 penalty is incurred. The part I'm having trouble with is that if a penalty is incurred there is a 12 hour rectification period so I would need the formula to skip the next 12 hours (24 rows) then begin searching for values outside of the range again and continue adding the $200 penalty as necessary.