Mr Excel,
I am trying to pull a dependent part number based on its assembly level in a bill of material. Here is the bill:
[TABLE="width: 365"]
<colgroup><col width="65" style="width: 65pt;"><col width="104" style="width: 104pt;"><col width="82" style="width: 82pt;"><col width="114" style="width: 114pt;"></colgroup><tbody>[TR]
[TD="class: xl66, width: 65, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"] [/TD]
[TD="class: xl66, width: 104, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]A[/TD]
[TD="class: xl66, width: 82, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]B[/TD]
[TD="class: xl66, width: 114, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]C[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]1[/TD]
[TD="class: xl64, align: center"]Assembly Level[/TD]
[TD="class: xl65"]Part Number[/TD]
[TD="class: xl65"]desired formula result[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]2[/TD]
[TD="class: xl64, align: center"]0[/TD]
[TD="class: xl65"]Cake[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]3[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Candles[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]4[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Dough[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]5[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]eggs[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]6[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]milk[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]7[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]sugar[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]8[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]flour[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]9[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Chocolate chips[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]10[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]Chocolate[/TD]
[TD="class: xl65"]Chocolate chips[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]11[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Frosting[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]12[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]sugar[/TD]
[TD="class: xl65"]Frosting[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]13[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]cream[/TD]
[TD="class: xl65"]Frosting[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]14[/TD]
[TD="class: xl64, align: center"]3[/TD]
[TD="class: xl65"]milk[/TD]
[TD="class: xl65"]cream[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]15[/TD]
[TD="class: xl64, align: center"]3[/TD]
[TD="class: xl65"]butter[/TD]
[TD="class: xl65"]cream[/TD]
[/TR]
</tbody>[/TABLE]
as you can see, the bill is arranged by level starting with the finished product (cake, at level 0). From there you can see that all the level 1 parts (candles, dough, etc.) are the main ingredients to build the cake. further you can see some levels 2's (eggs, milk, sugar, etc.) that are used to make the dough (level 1). Im trying to find a formula to search up to find the next vertical part number which would be the level value -1 (so if the part level is 3, search up for the next level 2, if the part level is 2, then search up to find the next level 1). for example, candles (level 1) would go into the finished part cake (level 0), and milk and butter (level 3's) would go into cream (level 2). I just want to display the results in the C2:15. Can you help me? Thanks so much
I am trying to pull a dependent part number based on its assembly level in a bill of material. Here is the bill:
[TABLE="width: 365"]
<colgroup><col width="65" style="width: 65pt;"><col width="104" style="width: 104pt;"><col width="82" style="width: 82pt;"><col width="114" style="width: 114pt;"></colgroup><tbody>[TR]
[TD="class: xl66, width: 65, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"] [/TD]
[TD="class: xl66, width: 104, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]A[/TD]
[TD="class: xl66, width: 82, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]B[/TD]
[TD="class: xl66, width: 114, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]C[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]1[/TD]
[TD="class: xl64, align: center"]Assembly Level[/TD]
[TD="class: xl65"]Part Number[/TD]
[TD="class: xl65"]desired formula result[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]2[/TD]
[TD="class: xl64, align: center"]0[/TD]
[TD="class: xl65"]Cake[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]3[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Candles[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]4[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Dough[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]5[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]eggs[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]6[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]milk[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]7[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]sugar[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]8[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]flour[/TD]
[TD="class: xl65"]Dough[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]9[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Chocolate chips[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]10[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]Chocolate[/TD]
[TD="class: xl65"]Chocolate chips[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]11[/TD]
[TD="class: xl64, align: center"]1[/TD]
[TD="class: xl65"]Frosting[/TD]
[TD="class: xl65"]Cake[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]12[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]sugar[/TD]
[TD="class: xl65"]Frosting[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]13[/TD]
[TD="class: xl64, align: center"]2[/TD]
[TD="class: xl65"]cream[/TD]
[TD="class: xl65"]Frosting[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]14[/TD]
[TD="class: xl64, align: center"]3[/TD]
[TD="class: xl65"]milk[/TD]
[TD="class: xl65"]cream[/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: center"]15[/TD]
[TD="class: xl64, align: center"]3[/TD]
[TD="class: xl65"]butter[/TD]
[TD="class: xl65"]cream[/TD]
[/TR]
</tbody>[/TABLE]
as you can see, the bill is arranged by level starting with the finished product (cake, at level 0). From there you can see that all the level 1 parts (candles, dough, etc.) are the main ingredients to build the cake. further you can see some levels 2's (eggs, milk, sugar, etc.) that are used to make the dough (level 1). Im trying to find a formula to search up to find the next vertical part number which would be the level value -1 (so if the part level is 3, search up for the next level 2, if the part level is 2, then search up to find the next level 1). for example, candles (level 1) would go into the finished part cake (level 0), and milk and butter (level 3's) would go into cream (level 2). I just want to display the results in the C2:15. Can you help me? Thanks so much