I create a table of contents and I have a map of product numbers per page. So the entry might look like this:
ABC123 => [59, 58, 57, 19, 36, 15, 33, 34, 13, 39, 11, 37, 38, 21, 20, 40, 63, 60, 45, 46, 22, 23, 24, 26, 3, 2, 10, 1, 7, 6, 5, 4, 8]
What I want to get from this:
1-8,10,11,13,15,19-24,26,33,34,36-38,40,45,46,57-60
I can code this, of course, but I decided that someone else had solved this problem. My googling gave nothing.
I appreciate any help you can offer, as always!