I have a large flat hierarchy table. I am looking for a method to select a parent and return a list of my lowest level children. I am somewhat familiar with VBA but I don't know where to begin coding this.
Thanks so much for any help I am able to receive on this. This has been a great learning source over the years, but this is one of the few instances I cannot find my problem so I am now posting.
Example below:
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD]Child[/TD]
[TD]Parent[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]40[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]100[/TD]
[/TR]
</tbody>[/TABLE]
If I select 5, I want values 2 & 1 returned.
If I select 50, I want values 20 & 10 returned.
If I select 100, the value 100 should return.
If I select 40, the value 20 should return.
Thanks so much for any help I am able to receive on this. This has been a great learning source over the years, but this is one of the few instances I cannot find my problem so I am now posting.
Example below:
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD]Child[/TD]
[TD]Parent[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]40[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]100[/TD]
[/TR]
</tbody>[/TABLE]
If I select 5, I want values 2 & 1 returned.
If I select 50, I want values 20 & 10 returned.
If I select 100, the value 100 should return.
If I select 40, the value 20 should return.
Last edited: