简体   繁体   中英

SumIF column a = X AND column b = Y OR Z

我正在努力创建一个公式,该公式求和C列IF(A列= [名称])AND(B列=“可能”或“建议”或“已提交”)。

Use SumProduct with + as the or operator rather than * as the and operator. Something like this:

=SUMPRODUCT(($A:$A=[name])*(($B:$B="Proposed")+($B:$B="Possible")+($B:$B="Committed"))*($C:$C))

您可以尝试以下公式

=SUMPRODUCT((A:A=[name])*(((B:B="Possible")+(B:B="Proposed")+(B:B="Committed"))>0),C:C)

=SUM(SUMIFS($C:$C,$A:$A,[name],$B:$B,{"Proposed","Possible","Committed"}))

With some functions, eg COUNTIF , SUMIF , COUNTIFS , SUMIFS , you can get away with referencing entire columns with no detriment to performance, though not with functions which operate over arrays, such as AGGREGATE , SUMPRODUCT , and any construction requiring CSE .

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM