Try this:
Add a helper row... so in B7 enter:
=SUM(INDEX($B3:$B5,MATCH($A$10,$A$3:$A$5,0)):INDEX(B3:B5,MATCH($A$10,$A$3:$A$5,0)))
copied across the 4 columns. This gives cumulative sum of specific building product requirements.. now in B11:
=IF(ROWS($A$11:$A11)>$E$7,"",INDEX($B$2:$E$2,MIN(IF(ROWS(A$11:A11)<=$B$7:$E$7,COLUMN($B$2:$E$2)-COLUMN($B$2)+1))))
confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down as far as you want in order to ensure you always capture all possibilities.
if you don't want the ending "s" change the table titles at top.
Bookmarks