I have a formula as shown in the attached image.
For column D I wish to calculate the w/w% of Raw materials (RM) and sub sub materials (SM) from their respective