I have the below formula.
=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheet1!$A$2:$A$4&"'!$B$3:$B$100"),$B3,INDIRECT("'"&Sheet1!$A$2:$A$4&"'!d$3:d$100")))/SUMPRODUCT(SUMIF(INDIRECT("'"&Sheet1!$A$2:$A$4&"'!$B$3:$B$100"),$B3,INDIRECT("'"&Sheet1!$A$2:$A$4&"'!$p$3:$p$100")))
I need to autofill across columns...