Indeed a wonderful contribution dear @Xyzor_Max .
I took the freedom to create the inverse of your list, thus following the same logic to see the still available ranges (or dates since they follow a comparable logic).
I defined 4 steps. Below how it goes. I started with creation of a list of missing numbers and named it step 01. If you are new, the function Max() is not related to ‘Max’
In step02 I make use of step01 and as you can see I changed two things. I replaced the SwitchIf for an If statement. However this is not a very good choice, the SwitchIf permits you to continue without expressing the case for if not. When you use an If statement, you need to tell what happens in case the condition is not met. In this case nothing so " ". This works, but is not very smart.
The second difference is the use of Concatenate() instead of the + , I Both work fine, it is mainly a matter of preference and habit I guess.
I continue with the SwitchIf below, it is the better choice:
And we finish with the last step I shortened a bit by not using
WithName(), this is a perso pref in this context, both work fine.
Sequence(1, step03.Count() - 1)
step03.Nth(CurrentValue) + '-' +
step03.Nth(CurrentValue + 1)
What a wonderful exercise with a method that can be applied in so many docs, Merci @Xyzor_Max