Converting hierarchy indent into columns

Copper Contributor

I have a text file with the following format

 

Admin

    HR

    Accounts

IT

   Support

   Technical

       Software

       Hardware

 

the expected result after copying to excel

Column 1Column 2Column 3
AdminHR 
AdminAccounts 
ITSupport 
ITTechnical 
ITTechnicalSoftware
ITTechnicalHardware
1 Reply

@BenjaminChew Provided that the text file contains a consistent number of spaces before each sub-department, you could used Power Query to create the desired column layout. Attached a workbook with two very crude examples.

 

Riny_van_Eekelen_0-1647074205634.png