Parent/Child Hierarchy.

C

Commish

I have a set of rows. In each row there are 2 IDs, one for the parent
and one for the child.

I need to display a hierarchy - so, I need to assign one row a parent
value (0) and then assign its children a second value (1) and then the
children of the children get a third value (2) and so on.

Does anyone know an easy way to do this? Without having to place those
values in a dozen columns?
 
J

James B

I have a set of rows. In each row there are 2 IDs, one for the parent
and one for the child.

I need to display a hierarchy - so, I need to assign one row a parent
value (0) and then assign its children a second value (1) and then the
children of the children get a third value (2) and so on.

Does anyone know an easy way to do this? Without having to place those
values in a dozen columns?


Depends on what you want to do with that data.
You have not given a lot of detail about the intended usage


Possibly have a column with the 'level'
and then another column with a corresponding set of spaces
maybe something similar to
=REPT(" ",levelcell*12)&Namecell

JimB
 
Z

zvkmpw

I have a set of rows. In each row there are 2 IDs, one for the parent
and one for the child.

I need to display a hierarchy ...

If you don't have a solution yet, you might consider using Microsoft
Visio. Among its many features, it can draw a hierarchy using data
from Excel.

Check out:
http://office.microsoft.com/en-gb/visio-help/
creating-organization-charts-from-imported-data-using-the-org-
chart-wizard-in-visio-
HA001182255.aspx?CTT=1

Even though the article talks about "organization charts," Visio is
more general. I've used it for other kinds of hierarchy.
 
C

Commish

If you don't have a solution yet, you might consider using Microsoft
Visio. Among its many features, it can draw a hierarchy using data
from Excel.

Check out:
 http://office.microsoft.com/en-gb/visio-help/
      creating-organization-charts-from-imported-data-using-the-org-
chart-wizard-in-visio-
      HA001182255.aspx?CTT=1

Even though the article talks about "organization charts," Visio is
more general. I've used it for other kinds of hierarchy.

This has promise.... but I cannot get it to work right... it puts the
28 children under the top node, but doesn't display the other 160 or
so grandchildren and great-grandchildren. I don't lame it for not
jamming everything onto 1 readable page, but it doesn't give me a
choice to do anything else.

To try to explain further, I have 2 columns which contain a parent ID
and a Child ID. I am trying to confirm that each child has a valid
parent. And then to create a hierarchy of the data. Is that a enough
to point me towards an answer? Right now, I can determine which is the
top node, which is a child of the top, which is a child of that second
level. But I cannot organize this into an organization...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top