nigelbloomy
New Member
- Joined
- Jul 2, 2012
- Messages
- 9
I'm using Excel 2007 on Windows XP. I have many different Bill of materials that come to me in the format below. I would like a formula in column D that can tell me the total quantity that will be used to make the top level part. For example: For part e, I will use 1 * .6(at level 2) *1 (at level 1). So I will use a total of .6 of part e to make my top level part a.
I tried using sum product to find anything lower than each level. My problem with that is when I multiply the quantity of part e by all part levels lower than 3 I get the .6 from the correct level 2, but I also get the .5 from the the other level 2 (part b).
I have been trying formulas to do this, but I think it may need VBA code to get it right.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Level[/TD]
[TD]Part[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b[/TD]
[TD].5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c[/TD]
[TD].01[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]d[/TD]
[TD].6[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]e[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]f[/TD]
[TD].2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]g[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]h[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Thank you for your help.
I tried using sum product to find anything lower than each level. My problem with that is when I multiply the quantity of part e by all part levels lower than 3 I get the .6 from the correct level 2, but I also get the .5 from the the other level 2 (part b).
I have been trying formulas to do this, but I think it may need VBA code to get it right.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Level[/TD]
[TD]Part[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b[/TD]
[TD].5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c[/TD]
[TD].01[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]d[/TD]
[TD].6[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]e[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]f[/TD]
[TD].2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]g[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]h[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Thank you for your help.