I'm new to Stack Overflow, so please excuse me, If I'm doing something stupid. I have a question regarding Excel, I want a column (let's say A) to do hierarchical numbering depending on the number in another column (let's say B). B clarifies the level of the row. F.e. if the level is 3, the numbering should have the format "X.X.X". I added an image as an example of how I imagine it to be.

I tried to develop an adecuate formular by myself and with the help of AI, but nothing seems to work. Has someone a solution for my issue?
I'm trying to find help for the development of a formular for my excel sheet and expect people either to give me tips regarding functions or even deliver a finished formula.

I've prepared UDF function which can be used as a formula in the sheet.
You should place the code in a standard module (
Alt+F11to open VBA editor, then Insert Module):In a sheet you use it as a formula:
=Numbers(B1:B19)In a new Excel (2021, 365) it is a dynamic formula which gives the whole array at once.