I need to implement a Grandparent-Parent-Child kind of logic in Excel/VBA. But not sure what is the best approach?
Example
I get below details from an Excel addin, so I have to use Child output and parent in some cases.
Please note that at first instance, I would not have idea if a given ticker will have parent-child relationship. Only by digging further, I will get all details. In some case, I get Parent child, and other cases GrandParent - Parent -> Child relationship.
So kind of I am looking for recursive logic which drill down and pull all details.
1) GrandParent :- .ABC had two childerns, ( 1,2)
.ABC -> .ABC1 , ABC2
2) Parent : ABC1 and ABC2 has 6 child each
.ABC1 -> Child1, Child2, Child3,.. Child6
.ABC2 -> Child1, Child2, Child3,.. Child6
3) Child : Child1, Child2, Child3,.. Child6 can have children too...
.ABC
/
.ABC1 .ABC2
\\ \\\
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…