or with a helper column to make less complicated formula.
E1:=COUNTIF(list1,D1)
H2:=IF($F$1="Cement",IF(SUM($E$1:$E$12)>=ROWS($A$1:A1),AGGREGATE(15,6,list2/($E$1:$E$12=1),ROWS($A$1:A1)),""),"")
note: second if is used above iferror, because iferror requires the array formula to evaluate to an error, whereas if just checks a number and if false does not run the array formula of evaluate.
In this example: with if aggregate runs 3 times, with iferror it would run 12 times.