=SUMPRODUCT((WEEKDAY(A2:A31,2)=1)*B2:B31)这是周一的,其它的按照改。如果是下拉自动生成7天的和:=SUMPRODUCT((WEEKDAY($A$2:$A$31,2)=ROW(A1))*$B$2:$B$31)
数据透视表试试