Hello,
New to VB code but know this is fully doable :). Would appreciate some help in the right direction
I have a list/BoM that contains single parts and assemblies. Some assemblies are manufactured, some are purchased in a finished state but the BoM describes its content anyway.
I want the script to go through row by row and check a specific column.
If it finds a part that is "Purchased" it should keep it, if it has no sub-levels.
If a part is "Purchased" and has lower levels beneth it it should delete those entire rows until it finds the next part on the same level.
If it finds a part that is "Manufactured" with sublevels that is Ok and it should just leave it.
In the attached example, it should fint that Part with name "G" is an assembly that is purchased and delete its content row 10-24(part H-V).
Text below, image attached.
Level P/N Part name Type
1 xxxxx Top level
2 xxxxx A Purchased
2 xxxxx B Purchased
2 xxxxx C Purchased
2 xxxxx D Purchased
2 xxxxx E Purchased
2 xxxxx F Purchased
2 xxxxx G Purchased
3 xxxxx H Purchased
3 xxxxx I Purchased
3 xxxxx J Purchased
3 xxxxx K Purchased
3 xxxxx L Purchased
3 xxxxx M Purchased
4 xxxxx N Purchased
4 xxxxx O Purchased
4 xxxxx P Purchased
4 xxxxx Q Purchased
4 xxxxx R Purchased
4 xxxxx S Purchased
4 xxxxx T Purchased
4 xxxxx U Purchased
4 xxxxx V Purchased
2 xxxxx W Manufactured
3 xxxxx X Purchased
3 xxxxx Y Purchased
Some help is greatly appreciated.
Bookmarks