no matter how hard I reconfigure COUNTIF and COUNTIFS I can't get the output to work, here is a table example :
条件下在Excel中计算行数我无法获得一个可以计算严重程度=高和(客户!=""或案例信息!="")
的功能在表格示例中,我应该返回5。
我到目前为止最接近的是= COUNTIFS(' 8.2'!C:C," 高"' 8.2' A:A,"<>"' 8.2' B:!B,"<>&#34) ,但这只会返回3.
什么excel功能可以做我需要的?
答案 0 :(得分:2)
使用COUNTIFS(),你需要做三件事:
=COUNTIFS(C:C,"High",A:A,"<>")+COUNTIFS(C:C,"High",B:B,"<>")-COUNTIFS(C:C,"High",A:A,"<>",B:B,"<>")
或者正如XORLX所示:
=SUM(COUNTIFS(C:C,"High",A:A,{"<>","","<>"},B:B,{"","<>","<>"}))
但是这要求单元格为真空白,没有返回的公式和空字符串
SUMPRODUCT略短但它要求您指定数据范围以避免不必要的迭代,因为它是一个数组类型公式:
=SUMPRODUCT((C2:C17="high")*((A2:A17<>"")+(B2:B17<>"")-((A2:A17<>"")*(B2:B17<>""))))
或者是XORLX的这个,他忘了更多关于excel公式而不是我所知道的:
=SUMPRODUCT((C1:C20="high")*((A1:A20<>"")+(B1:B20<>"")>0))