Agree VjBox, maybe my data was wrong because what you said is correct and a logic should apply. Assume Flywheel is Level 1. However, I would ignore the dots and can only suggest to use the blankcells as represent the range (?) as that is the constant regardless of level or not.
There are dynamic blank cells in the Hierarchy column ie.e 1, 2, 3 or whatever. Would not finding the first instance of a blank cell in the Hierarchy column, then to the end of that range until a cell that contains a value...then concatenate that dynamic range with possibly using offset? Just thinking aloud here as I lack the obvious skills that you possess.
Appreciate your help though KjBox, I really do