=SUMIF(INDIRECT(D2&"!$A$1:$B$6"),Sheet1!$F$2,INDIRECT(D2&"!$B$1:$B$6"))