F1 is the query value
F2 is the formula value of the max consecutive occurrences.
I still get an error when F1 is = to the Value in F2.
If F1 is one less than F2 then it runs okay. But gives a false return.
https://www.dropbox.com/s/73vlatpid3...ries.xlsm?dl=0
The button has the last code you posted on it has XX in the sub title.
Howard