Each electronic components on electronics PCB has a reference designator (unique location). The reference designator usually consists of one or two letters followed by a number, e.g. R13, C1002.
I'm trying to create a UDF that gets a string of locations and returns a group of consecutive locations as shown:
Examples:
1. C1, C2, C3 ==> C1-C3
2. R4, R1, R7, R5, R3 ==> R1, R3-R4, R7
3. LD100, LD101, LD102, LD103, LD104, LD105, LD107 ==> LD100-LD105, LD107