Hello, I have quite the issue I am looking to resolve. I've been searching all over the internet now for at least 3 hours with no luck.
I have a word document with thousands of little areas with seemingly random messes of numbers, such as this:
Code:
11, 14, 35-37, 39-41, 49-51, 57-58, 63-64, 66, 68, 73-78, 82-87, 96, 114, 123, 17, 20-23, 25, 42, 56, 69-71, 89-91, 124, 17, 22-23, 56, 70, 89-91, 124, 20-21, 42, 69, 71, 25, 16, 18-19, 26-29, 32, 52, 72, 125, 43, 46, 53, 54, 59-62, 88, 93-94, 92, 116, 121, 122
I need to create VBA code that will allow me to take each of those little lists, expand those ranges (i.e., "39-41" would become separate entries of "39, 40, 41"), sort the list, then compress back into number ranges, where applicable.
Ideally I would just be able to select the numbers and fire the macro. I have found alphabetical sorting options, but I need numerical sorting.
Thanks in advance!!