简体   繁体   English

Excel Countifs公式

[英]Excel Countifs formula

I have nested the below IF/AND/COUNTIFS formula. 我嵌套了下面的IF / AND / COUNTIFS公式。 The logic is based on the country in column N, refer to specific range on another sheet in the same WB. 逻辑基于第N列中的国家/地区,请参阅同一WB中另一页上的特定范围。 The problem I am running into is I am getting FALSE results when it should be TRUE. 我遇到的问题是当它应该为TRUE时会得到FALSE结果。 I have triple checked all my ranges. 我已经三重检查了我的所有范围。 And all values on both sheets are formatted as General. 并且两张纸上的所有值都将格式设置为“常规”。 An 一个

=IF(AND(N2="Australia")*COUNTIFS(Ratings!A$2:A$14,'Sheet 1'!AT2,Ratings!B$2:B$14,'Sheet 1'!AU2),TRUE,
IF(AND(N2="Brazil")*COUNTIFS(Ratings!D$2:D$13,'Sheet 1'!AT2,Ratings!E$2:E$13,'Sheet 1'!AU2),TRUE,
IF(AND(N2="CanadaEnglish")*COUNTIFS(Ratings!G$2:G$19,'Sheet 1'!AT2,Ratings!H$2:H$19,'Sheet 1'!AU2),TRUE,
IF(AND(N2="CanadaFrench")*COUNTIFS(Ratings!J$2:J$19,'Sheet 1'!AT2,Ratings!K$2:K$19,'Sheet 1'!AU2),TRUE,
IF(AND(N2="France")*COUNTIFS(Ratings!P$2:P$21,'Sheet 1'!AT2,Ratings!Q$2:Q$21,'Sheet 1'!AU2),TRUE,
IF(AND(N2="Germany")*COUNTIFS(Ratings!M$2:M$17,'Sheet 1'!AT2,Ratings!N$2:N$17,'Sheet 1'!AU2),TRUE,
IF(AND(N2="Italy")*COUNTIFS(Ratings!S$2:S$7,'Sheet 1'!AT2,Ratings!T$2:T$7,'Sheet 1'!AU2),TRUE,
IF(AND(N2="Mexico")*COUNTIFS(Ratings!V$2:V$17,'Sheet 1'!AT2,Ratings!W$2:W$17,'Sheet 1'!AU2),TRUE,
IF(AND(N2="Spain")*COUNTIFS(Ratings!Y$2:Y$24,'Sheet 1'!AT2,Ratings!Z$2:Z$24,'Sheet 1'!AU2),TRUE,
IF(AND(N2="United Kingdom")*COUNTIFS(Ratings!AB$2:AB$13,'Sheet 1'!AT2,Ratings!AC$2:AC$13,'Sheet 1'!AU2),TRUE,
IF(AND(N2="USA")*COUNTIFS(Ratings!AE$2:AE$20,'Sheet 1'!AT2,Ratings!AF$2:AF$20,'Sheet 1'!AU2),TRUE)))))))))))

在此处输入图片说明

在此处输入图片说明

Any thoughts? 有什么想法吗?

you formula is working perfect there is nothing wrong in it. 您的公式运作完美,其中没有任何错误。

Please check below sample what i have tried as like you. 请在下面的样本中检查我尝试过的样本。 It's working for me and it returns True when actually the conditions are perfect. 它为我工作,并且在实际条件完美时返回True

Hope this is what your tried for, if not please elaborate your question. 希望这是您的尝试,否则请详细说明您的问题。 So that this will be solved. 这样就可以解决。

And please check you formula option is Automatic or Manual. 并且请检查您的公式选项是自动还是手动。

Note: I Just copied you formula, and changed reference for Germany and it works perfect. 注意:我只是复制了您的公式,并更改了对德国的引用,所以效果很好。

Sheet 1 as per your formula: 根据您的公式表1:

在此处输入图片说明

Sheet 1 My Own Written Formula as Like yours: 表格1我自己编写的公式,就像您一样:

在此处输入图片说明

Ratings Sheet: 评分表:

在此处输入图片说明

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

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