Better Way to Solve Part Number Rollup (Bill of Materials)

VBE313

Well-known Member
Joined
Mar 22, 2019
Messages
686
Office Version
  1. 365
Platform
  1. Windows
In the following Excel document (File), I solved a way to have the "Part Number Roll Up" column to have the correct Part Number with the correct line. The logic behind this is:
  • If Column N (Level) = 1, then Column M (Part Number Roll Up) = Column O (Part Number)
  • If Column N (Level) = 2 & Column P (Task) = "MAKE", then Column M (Part Number Roll Up) = Column O (Part Number)
    • Else If Column N (Level) = 2 then Column M (Part Number Roll Up) = Level 1 Make Part Number
  • If Column N (Level) = 3 & Column P (Task) = "MAKE", then Column M (Part Number Roll Up) = Column O (Part Number)
    • Else If Column N (Level) = 3 then Column M (Part Number Roll Up) = Level 2 Make Part Number
  • If Column N (Level) = 4 & Column P (Task) = "MAKE", then Column M (Part Number Roll Up) = Column O (Part Number)
    • Else If Column N (Level) = 4 then Column M (Part Number Roll Up) = Level 3 Part Number
If you notice the Tasks at the bottom of each Level 1 have "WELD". This needs to happen after everything else is made, so that is why those Level 3 Welds at the bottom Roll up to the "MAKE LEVEL 2"

Is there a better way to solve this than the way I did? Perhaps a UDF in Column M (Part Number Roll Up).
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Not sure if I've understood correctly, but this gives the same results.
=IF(P2="","",IF(P2="MAKE",O2,IF(P2="weld",I2,M1)))
 
Upvote 0
Not sure if I've understood correctly, but this gives the same results.
=IF(P2="","",IF(P2="MAKE",O2,IF(P2="weld",I2,M1)))
Hi Fluff, this did calculate correctly, However I only used Weld as an example. There can be multiple other operations besides Weld. How could I solve that then?
 
Upvote 0
Depends on what should happen & what the other words are.
Can you supply some examples?
 
Upvote 0
Let me try to better explain my logic.

All Level 2's that <> "MAKE" should have the Level 1 Part Number

All Level 3's that <> "MAKE" should have the Level 2 Part Number

All Level 4's that <> "MAKE" should have the Level 3 Part Number

The only "Task" that should matter is the "MAKE" task. Anything that is not a "MAKE" needs to roll up to the next level that is a "MAKE" item.
 
Upvote 0
Maybe this hierarchical picture can help a little more.
Snag_5847fed0.png
 
Upvote 0
Is this what you mean
=IF(P2="","",IF(P2="MAKE",O2,OFFSET(G2,0,N2-1)))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,850
Messages
6,127,282
Members
449,373
Latest member
jesus_eca

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top