excel - Complex Macro- Creating tree relations -


i need creating macro perform following function, or similar (i not sure whether possible create such macro) :

i have 60,000 + rows of data 2 columns, assemblies , components. assembly has multiple components ex:

assembly/comps image

however, assembly can component.

i need make tree of relationships between assemblies , components, find highest level , children assemblies , children of children.

please let me know if there way can make things easier!

ok, 2nd approach think set following: sheet 1 - existing data table 60,000 rows

sheet 2 - "goes into" analysis, specific part number in cell a1 (or wherever want it), , cell a1 selected

a "goes into" macro following:

starts in current cell , increments row number , sets indent level of 1

gets list of matches in data table assemblies selected component goes (see http://office.microsoft.com/en-us/excel-help/how-to-look-up-a-value-in-a-list-and-return-multiple-corresponding-values-ha001226038.aspx#_toc273640147)

decrements indent level , ends if there no entries in resulting list, otherwise each entry in list, puts matching assembly number current cell (using indent level add leading spaces, or format needed), increments row number, increments indent level , calls "goes into" macro recursively assembly number

this macro produce indented list of higher level assemblies part number placed in cell a1.

sheet 3 - add sheet "contains" analysis , set same way - or if prefer, on sheet 2 in different column. second analysis same 1st, except start list of components going assembly instead of list of assemblies component goes into.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -