@ivandgreat and LalitPandey87,
Try LalitPandey87's code against the second sample data you showed over in the MrExcel forum here...
Loop To Last EndPt
I get the code crashing Excel completely (if you do not stop it earlier enough using CTRL+Break). So my question is... was that second sample data real or not (it was the entire reason I did not give you a solution).
@LalitPandey87,
See the above link for the sample data and this link for why I did not understand how to provide any code to the OP (and for a hint at what I think is causing your code to crash when used against it)...
Loop To Last EndPt
Bookmarks