Excel - How to use indent to transform hierarchy into table

preview_player
Показать описание
This video is showing how to make table with all hierarchy levels from one column that includes hierarchy with multiple levels where each level has different indent.

To get indent number I created own function using following VBA Code:
Public Function IndentLvl(CellRef As Range) As Long
IndentLvl = CellRef.IndentLevel
End Function

If you have any questions please comment below.

Enjoy :)
Рекомендации по теме
Комментарии
Автор

You have saved my life. You are the most brilliant person alive. Please marry me! 😭😭😭😭

bubblegum
Автор

Is there any way to do this if I have spaces instead of indents?

parsaalizadeh
Автор

I would need a piece of advice: if I have "spaces" (space bar instead of "intents"...?how do deal with it? thank you!

MEofficero
Автор

Hello ! Thank you for your video, it is really helpful. I can across your channel because I try to transform an extract from SAP into a table so I can analyse it easier. Therefore when i export the file, it does not come with indent but instead (*). for example :
* BCR200 -
* BFG100 -
** Frr AUT
** Frr AUTT
*** Dbr Uyt
** ATT ghr
*** HEK lll
etc...

Is there a way with VBA to use a equivalent of indent with (*) ? Thank you for your time

remyrichard
Автор

How do we remove the numbers if the header text with count of its child (communication service 1) like this

abd
Автор

After adding module in Developer -> when I used Indentlvl function-> I am egtting Value error as result. Please help

MamathaAcharya-eo