+ Reply to Thread
Results 1 to 6 of 6

split an indented hierarchy

Hybrid View

  1. #1
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    77

    split an indented hierarchy

    Hi All,

    Any help/Guidance appreciated in splitting up a hierarchy that has spaces and '|'.

    I have attached an example.

    Hierarchy
    ABC1 Aust
    |--5 1000000
    |
    |--DUMMY P
    |
    |--5 1000010
    | |
    | |--1000010
    | |
    | |--5 1000088
    | | |
    | | |--1000088
    | | |
    | | |--5 1000006
    | | | |
    | | | |--1000006
    | | | |--1003910
    | | | |--1003911
    | | | |--A100050
    | | | |--A100049
    | | | |
    | | | |--5 1000021
    | | | | |
    | | | | |--1000021
    | | | | |
    | | | | |--5 1000132
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,243

    Re: split an indented hierarchy

    Maybe use Text to Columns delimited with space and hyphen/minus/dash. Output to column B. Replace all "|" with "".
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-06-2021
    Location
    Germany
    MS-Off Ver
    365
    Posts
    7

    Re: split an indented hierarchy

    Hi Dean,
    what are you aiming for?
    Extracting all parent child relations or just some kind of formatting?

  4. #4
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    77

    Re: split an indented hierarchy

    Hi Matze,

    I need to get it split to Parent/Child node at each level so I can reconcile the Parent/Child against other data.

    Cheers

    Dean

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,709

    Re: split an indented hierarchy

    See attached and if this is what you are looking for, then you can split the data in Power Query using the Pipe delimiter.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    12-06-2021
    Location
    Germany
    MS-Off Ver
    365
    Posts
    7

    Re: split an indented hierarchy

    First of all you have to determin for every element
    - level
    - does it have children
    then the number of father elements on this level above...see attachment

    Handling hierarchies looks like a simple task, but is is not.
    I strongly recommend to use a database for this purpose.

    HTH
    Matze

    Hierarchy.PNG
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Split indented hierarchy list into columns
    By boyerusmc in forum Excel General
    Replies: 2
    Last Post: 07-27-2020, 05:19 PM
  2. Split indented Hierarchy list into columns
    By Goose2011 in forum Excel General
    Replies: 16
    Last Post: 07-25-2020, 09:33 AM
  3. [SOLVED] Indented Level Sort
    By brncfan7 in forum Excel General
    Replies: 3
    Last Post: 02-28-2017, 06:29 PM
  4. How do I convert column hierarchy to flat file hierarchy
    By tbucki1 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 09-21-2016, 09:33 PM
  5. Hierarchy Indented List, Table, Column and Value - need to create uniqueid column
    By mcolli01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 01:09 PM
  6. [SOLVED] Separate Indented cells
    By patsuganda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2012, 11:16 AM
  7. totaling indented subsections
    By steev_jd in forum Excel General
    Replies: 1
    Last Post: 07-25-2006, 03:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1