[英]Excel - formula for If/Then conditions with negative numbers
I'm working on a file that will measure test results and identify gaps for required knowledge competency vs current knowledge competency.我正在编写一个文件,该文件将衡量测试结果并确定所需知识能力与当前知识能力之间的差距。 I have 5-6 competencies to measure for each person.我有 5-6 项能力来衡量每个人。 The lowest gap would be -4 while the highest is 4.最低差距为 -4,最高差距为 4。
Conditions (IF)条件 (IF) | Rating (THEN)评级(当时) |
---|---|
All gaps have negative values所有间隙都有负值 | Does not meet requirements不符合要求 |
Has 1-2 negative values but with 1-2 zero gaps有 1-2 个负值但有 1-2 个零间隙 | Meets some requirements满足一些要求 |
All gaps are zero所有差距都为零 | Meets all requirements满足所有要求 |
1-2 gaps are positive, can have zero 1-2 间隙为正,可以为零 | Exceeds some requirements超出部分要求 |
All gaps are positive and have no zero所有差距都是正的,没有零 | Exceeds all requirements超过所有要求 |
For example,例如,
Subjects科目 | Gaps差距 | Remarks评论 |
---|---|---|
Competency 1能力 1 | 2 2 | 2 pts higher than expected比预期高2个百分点 |
Competency 2能力2 | -1 -1 | Less than expected低于预期 |
Competency 3能力 3 | -1 -1 | Less than expected低于预期 |
Competency 4能力 4 | -1 -1 | Less than expected低于预期 |
Competency 5能力 5 | 0 0 | expected预期的 |
Competency 6能力 6 | 1 1 | 1 pt higher than expected比预期高 1 个百分点 |
Total Rating总评分 | Meets some requirements满足一些要求 |
I've tried dissecting step-by-step and incorporating Index/Match/Mode formulas as well but I can't seem to make it work.我已经尝试过逐步剖析并合并索引/匹配/模式公式,但我似乎无法使其工作。 I really need some help with this!我真的需要一些帮助! Thank you in advance!先感谢您!
Assuming the gaps are in B2:B7
, I believe this follows your logic:假设差距在B2:B7
,我相信这符合你的逻辑:
=IF(COUNTIF(B2:B7,">=0")=0,"Does not meet",
IF(COUNTIF(B2:B7,0)=COUNT(B2:B7),"Meets all",
IF(COUNTIF(B2:B7,">0")=COUNT(B2:B7),"Exceeds all",
IF(COUNTIF(B2:B7,"<0")>0,"Meets some",
"Exceeds some"))))
&" requirements"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.