How to sort non-consecutive data that has products out of sequence?

The spreadsheets I receive from the supplier have added some new colors for all their products but they are all several lines down from the original colors and I need them all together.

Example: The product ID’s and names are like this one:

Product ID: 51-05 LGAQ
Product name: Birthday Boy Shirts Aqua Lg (14)

The lines for that product are from 1383 thru 1424 and then from 27468 through 27481.

Thank you!

|From a recent job advertisement: Looking for a telepath. You know where to apply.|

SCNR. Joking aside. Please read how to use this media and how to ask a good question. Your question in fact explains that you want to sort something. But necessary details are missing. From your given example it is not evident how to identify the consecutive criteria. Hence maybe no one can help for a sort procedure. A list of all items from a consecutive sequence plus some examples of other items not belonging to the consecutive items to show how to distinguish them could be a starting point. Upload of a sample file with a subset of anonymised not sensitive data could also be helpful. Version of LO, OS and bitness could also be relevant.