=SUMPRODUCT((INT($A$2:$A$1000)=D2)*$B$2:$B$1000)/SUM(--(INT($A$2:$A$1000)=D2)),按CTRL+SHIFT+ENTER结束公式,下拉.