Quote Originally Posted by Rick Rothstein View Post
I see your code does what the OP showed for his small sample data set, but I am not convinced it is an all-encompassing solution although I cannot tell for sure because, after repeated efforts in the original forum, I cannot seem to get him to post a larger data sample. Another reason I am unsure if your code is the "ultimate" solution has to deal with the question I raised back in the other forum...

Loop To Last EndPt

Once the OP answers that question and provides a larger data set to see how it all applies, I think then we will know if your code "does it all" or not and, if not, we should be able to figure out how to modify it so that it does.

Hi Rick,

I just add much larger data for this forum with expected output. Please have a look.

br,
ivan