B1输入:
=IF(AND(A1=30,A2<=300),3,IF(AND(A1=50,A2<=500),5,1))
嵌套
比如说:把成绩为60分以下、60-69、70-79、80-89、90以上等分数自动填写优、良、中、及格、差。
语句是:
=IF(A2>=60,IF(A2>=70,IF(A2>=80,IF(A2>=90,"优","良"),"中"),"及格"),"差")
但也可与其他函数或筛选功能配合使用
B1单元格写公式:
=if(and(a1=30,a2<=300),3,if(and(a1=50,a2<=500),5,1))
在sheet2的C1中输入或复制粘贴下列公式:
=SUMPRODUCT((Sheet1!A:A=A1)*(Sheet1!B:B=B1),Sheet1!C:C)
或
=SUMPRODUCT((Sheet1!A:A=A1)*(Sheet1!B:B=B1),Sheet1!C:C)
或
=LOOKUP(1,0/((Sheet1!A:A=A2)*(Sheet1!B:B=B2)),Sheet1!C:C)
下拉复制
B1公式:
=IF(AND(A1=30,A2<=300),3,IF(AND(A1=50,A2<=500),5,1))