可以不用輔助列,見下面的公式:
F2單元格公式:
=SUMPRODUCT(($A$2:$A$7=E2)*(MATCH($B$2:$B$7,$B$2:$B$7,0)=ROW($B$1:$B$6)))
或者
=SUMPRODUCT(($A$2:$A$7=E2)/COUNTIFS(A$2:A$7,A$2:A$7,$B$2:$B$7,$B$2:$B$7))
G2單元格公式:
=SUMPRODUCT(($A$2:$A$7=E2)*($C$2:$C$7=F6)*(MATCH($B$2:$B$7,$B$2:$B$7,0)=ROW($B$1:$B$6)))
=SUMPRODUCT((($A$2:$A$7=E2)*(C2:C7=F6))/COUNTIFS(A$2:A$7,A$2:A$7,$B$2:$B$7,$B$2:$B$7))
如果理解不了上面的公式,將它記住,會套用就行了
一起探討用Excel偷懶,提高工作效率的技巧!
可以不用輔助列,見下面的公式:
1、單條件求唯一值個數F2單元格公式:
=SUMPRODUCT(($A$2:$A$7=E2)*(MATCH($B$2:$B$7,$B$2:$B$7,0)=ROW($B$1:$B$6)))
或者
=SUMPRODUCT(($A$2:$A$7=E2)/COUNTIFS(A$2:A$7,A$2:A$7,$B$2:$B$7,$B$2:$B$7))
解釋:第二個公式是根據求唯一值個數的公式變形而來,比如求A2:A7單元格區域營業員的個數,其公式為:=SUMPRODUCT(1/COUNTIF(A2:A7,A2:A7))2、雙條件求唯一值個數G2單元格公式:
=SUMPRODUCT(($A$2:$A$7=E2)*($C$2:$C$7=F6)*(MATCH($B$2:$B$7,$B$2:$B$7,0)=ROW($B$1:$B$6)))
或者
=SUMPRODUCT((($A$2:$A$7=E2)*(C2:C7=F6))/COUNTIFS(A$2:A$7,A$2:A$7,$B$2:$B$7,$B$2:$B$7))
如果理解不了上面的公式,將它記住,會套用就行了
一起探討用Excel偷懶,提高工作效率的技巧!