Quote Originally Posted by ayazgreat View Post
In my all posts from starting to end all ranges data provided by me in breaks , in both posts case ranges do not have contiguous throughout the table.They can be non-contiguous or overlap
Sorry about the delay in getting back to you... I had some personal stuff to take care of.

Okay, I think I am confused. Your first posting showed ranges that were continuous, without breaks or overlaps, and you indicated the code I gave you worked fine for you. Now you are showing ranges with breaks and overlaps... is this a separate question, using different source data than than you showed us in your first message. If not, that is, if your data for the first question can also have breaks and overlaps, then the function I posted (which you said works for you) does not really work correctly. If you are now asking for help with a similar looking data structure, but one that is different from the first in that it can have breaks and overlaps in its ranges, then I need to know this. The problem I have right now is in figuring out if I have to fix my first function or not. Can you please clarify all of this for me?