对学术学生进行分类的声明

时间:2015-09-23 11:21:46

标签: excel if-statement excel-formula

我正在尝试创建一个嵌套的IF / AND语句,将学术学生分类为焦点小组。我必须满足的条件如下:

  1. BD =“是”,AY => 5或
  2. BD =“是”并且AY = =< 5或
  3. BG =“是”并且BF =“否”并且AY是=> 5或
  4. BF =“是”并且BG =“否”并且AY => 5或
  5. BG =“是”并且BF =“否”并且AY = = <5或
  6. BF =“是”并且BG =“否”并且AY = = <5或
  7. X =“D”且Y =“D”且AY = = <4或
  8. 任何其他结果
  9. 我尝试了几种不同的方法,但不能将任何东西写成一个陈述。

1 个答案:

答案 0 :(得分:0)

我无法发表评论(没有足够的声誉)。可能需要几个countifs()公式:

1 BD =&#34;是&#34;和AY =>&gt; 5:=countifs(BD:BD,"Yes",AY:AY,">=5")

2 BD =&#34;是&#34;和AY = =&lt; 5:=countifs(BD:BD,"Yes",AY:AY,"<=5")

3 BG =&#34;是&#34;和BF =&#34;否&#34;和AY =>&gt; 5: =countifs(BG:BG,"Yes",BF:BF,"No",AY:AY,">=5")

4 BF =&#34;是&#34;和BG =&#34;否&#34;和AY =>&gt; 5:=countifs(BG:BG,"No",BF:BF,"Yes",AY:AY,">=5")

5 BG =&#34;是&#34;和BF =&#34;否&#34;和AY = =&lt; 5:=countifs(BG:BG,"Yes",BF:BF,"No",AY:AY,">=5")

6 BF =&#34;是&#34;和BG =&#34;否&#34;和AY = =&lt; 5:=countifs(BG:BG,"No",BF:BF,"Yes",AY:AY,"<=5")

7 X =&#34; D&#34;和Y =&#34; D&#34;和AY = =&lt; 4:=countifs(X:X,"D",Y:Y,"Yes",AY:AY,"<=4")

嵌套IF: =IF(AND($BD2="Yes",$AY2>=5),1,IF(AND($BD2="Yes",$AY2<=5),2,IF(AND($BG2="Yes",$BF2="No",$AY2>=5),3,IF(AND($BF2="Yes",$BG2="No",$AY2>=5),4,IF(AND($BG2="Yes",$BF2="No",$AY2<=5),5,IF(AND($BF2="Yes",$BG2="No",$AY2<=5),6,IF(AND($X2="D",$Y2="D",$AY2<=4),7,8)))))))