=sumif(B1:B50,"Y",C1:C50)B1:B50假设为条件的区域。C1:C50假设为求和区域
D2输入:=SUMIF(B:B,"Y",C:C)
=sumif(b:b,"y",c:c)
=sumif(B:B,"Y",C:C)
=sumproduct((B1:B1000="Y")*C1:C1000)