[英]How to count cells with multiple criteria values within the cell
I've got a column showing an outcome (positive/negative), and the other column contains the reasons for that outcome in text format, looking something like this: https://docs.google.com/spreadsheets/d/1bgZnZBGY_0iksANrsixRXRSNz0l9REYmJC29ZmygNjs/edit?usp=sharing 我有一列显示结果(正/负),另一列以文本格式包含该结果的原因,如下所示: https : //docs.google.com/spreadsheets/d/1bgZnZBGY_0iksANrsixRXRSNz0l9REYmJC29ZmygNjs/编辑?usp =共享
What I want to do is to group the reasons together and find the number of outcomes that contain at least one of those "reasons", as seen in columns G and H. 我要做的是将原因归为一组,并找到包含至少一个“原因”的结果数量,如G和H栏所示。
I've tried using =sum(countifs(C3:C9,{" Understands responsibility "," Takes instruction well "," Looks forward to work "})) for the first grouping, for example, but it only gives me the count for "Understands responsibility", but not the rest. 例如,我尝试将= sum(countifs(C3:C9,{“ 理解责任 ”,“ 很好地接受说明 ”,“ 期待工作 ”})“)用于第一个分组,但是它只能给我计数代表“了解责任”,而不是其余的。 Using countif alone repeats the count of the outcome if multiple "reasons" in the groupings are under the outcome. 如果分组中有多个“原因”,则单独使用countif会重复计数结果。 (ie there's a double count if "Understands responsibility" and "Looks forward to work" are in the same cell for reasons) (即,出于某种原因,如果“理解责任”和“期待工作”在同一个单元格中,则存在重复计数)
Help would be appreciated, many thanks. 帮助将不胜感激,非常感谢。
Try this in H3.. needs to be 'Control-Shift-Enter'ed: 在H3中尝试此操作。需要输入“ Control-Shift-Enter”:
=SUM(1*(MMULT(1*(TRANSPOSE(ROW(E3:E5))>0),1*ISNUMBER(SEARCH(E3:E5,TRANSPOSE(C3:C9))))>0))
This results in a "distinct count" per row. 这导致每行的“区别计数”。 It can take a variable number of responses and reason groups; 它可以采用可变数量的响应和原因组; you can change 'E3:E5' in the 2 spots to point to your other groups. 您可以在两个位置更改“ E3:E5”以指向您的其他组。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.