简体   繁体   English

Excel 2016 COUNTIFS更改

[英]Excel 2016 COUNTIFS Change

In Excel 2013 you were able to select multiple "criteria" in a single "criteria range" if you put it in { }. 在Excel 2013中,如果将其放在{}中,则可以在一个“条件范围”中选择多个“条件”。

Code Example: =COUNTIFS(A1:A10,{"A","B","C"}) 代码示例:= COUNTIFS(A1:A10,{“ A”,“ B”,“ C”})

This code would count all the cells with a value of A, B, or C. 该代码将对所有值为A,B或C的单元格进行计数。

In Excel 2016, it seems that it will only count the first item in the criteria range when using the code above. 在Excel 2016中,使用上面的代码时,它似乎仅会计数条件范围内的第一项。 It also appears that you still can't use the OR function to solve this problem. 看来您仍然不能使用OR函数来解决此问题。

Does anyone have a solution for how to use multiple "criteria" in a single "criteria range" without exploding it into 3 separate COUNTIF functions SUM'd together? 是否有人有解决方案,如何在单个“条件范围”中使用多个“条件”,而又不将其分解为SUM'SUM在一起的3个独立的COUNTIF函数?

将SUM()放在公式周围:

=SUM(COUNTIFS(A1:A10,{"A","B","C"}))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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