In you example data in Output, imho, does not matching with BOM data.
B C D 1Parent desc Mat type Component 6Item 1 C 3.1 7Item 1 C 3.2
Sheet: Output
B C D 1Parent Desc Component Comp Desc 10Comp 4 3.1Comp 9 11Comp 4 3.2Comp 10
Sheet: BOM
Bookmarks