如图
G2中输入=SUMPRODUCT((MONTH($A$2:$A$20)&"月"=$F2)*($B$2:$B$20=G$1)*$C$2:$C$20)
如果行号请根据实际情况调整
G2=SUMPRODUCT((MONTH($A$2:$A$10)=--SUBSTITUTE($F2,"月",))*($B$2:$B$10=G$1)*$C$2:$C$10)向下向右复制
g2:=SUMPRODUCT(N((MONTH(A2:A10)&"月"=F2))*(C2:C10))
H2:=SUMPRODUCT(N((MONTH(A2:A10)&"月"=F2))*(D2:D10))