Hi,
I have exported data from a maintenance database, where each row belongs to one of four levels in a hierarchy. Imagine a machine being the top level, and then you drill down through the hierarchy to main parts, their subparts until you reach the smallest bits.
Each row has a unique asset number for the specific (sub-)part, accompanied by a "parent asset" to which it belongs. The parent asset is the immediate level above, if any.
I have attached a workbook with an example, where I have added an extra column A, where I have manually indicated which level each row represents.
Only one row has the top level 1, while in this example there are two rows that have the next level 2, etc. The parent asset cell is blank for the top level 1, since it hasn't got any parent level above it.
My problem is that the exported rows don't come sorted in a meaningful way, and they can't be sorted the way I want by using the regular sort function in Excel.
I am therefore looking for a way to create helper columns that I can use for sorting purposes.
I want to sort the rows this way:
Level 1 followed by the alphabetically next level 2 row, followed by this level 2 row's alphabetically next level 3 row, followed by this level 3 row's alphabetically next level 4 row(s) - insofar that each level contain rows to sort.
Level 1
Level 2.1 belonging to level 1
Level 3.1 belonging to level 2.1
Level 4.1 belonging to level 3.1
Level 4.2 belonging to level 3.1
Level 4.3 belonging to level 3.1
Level 3.2 belonging to level 2.1
Level 4.1 belonging to level 3.2
Level 2.2 belonging to level 1
Level 3.1 belonging to level 2.2
Etc.
Does anybody have a solution for this?
Regards,
Marbleking
Bookmarks