Forum Discussion
HSalles
Jan 18, 2023Copper Contributor
Create a product tree using vba
Hi, I need to create a product tree and I would like to do this using vba, is that possible? I already have all the components so I just need to create relations between them. Please look at the ...
mtarler
Jan 18, 2023Silver Contributor
HSalles In the attached I formatted the orig table as a table called "Products" and used this:
=MIN(FILTER(Products[Saldo/qtd],LEFT(Products[NIVEL],LEN(F2))=LEFT(F2,99),0))
basically filters the list based on having the same prefix
BTW, I realize this isn't VBA solution but anything using a cell formula can be replicated in VBA so the answer is yes. I just prefer to avoid VBA when possible due to compatibility and security concerns.
- HSallesJan 18, 2023Copper Contributormtarler
Unfortunately this isn't the solution. If you take a look at your worksheet, at the column max and row 2, the value should be 356 (56 that I have stocked plus 300 that I can manufacture). The same goes to the row 3, the value should be 175 (175 that I have stocked plus 0 athat I can manufacture).
Sorry if I didn't made my self clear, I think that it's better now.