I would use a pivot table, see attachement
I would like to convert data in two columns, which lists an item and it's parent, into a visual hierarchy showing the relationship between products, similar to an organisation structure.
I am finding this quite hard to explain. Please see the attached xls as this shows what i am trying to do.
Please could someone give me some ideas about how to proceed.
Thanks for the reply, I hadn't thought of pivot tables. However I realise that i didn't post enough sample data, as i expect to have more than two levels of hierarchy, would i be able to this still with a pivot table.
Making it work for any number of hierarchy levels was a real bear. I had to use a recursive subroutine and I think I might've hurt my brain in the process.
It's not exactly what you asked for, but it's pretty darn close! For each item listed it recursively traces thru the parents in the heirarchy and lists them.
If you try to modify it and/or can't get it to work outside of my example, you might just be on your own. I think I'm gonna go sit in the corner now and tremble for awhile...
Sub All_Macros(Optional control As Variant)
There are currently 1 users browsing this thread. (0 members and 1 guests)