EXCEL2003 if函数只有7组,8个IF怎么用?=IF(AND(F7="特大型",G7="高级"),0.03,IF(AND(F7="大型",G7="高级"),0.01,IF(AND(F7="中型",G7="高级"),0.05,IF(AND(F7="小型",G7="高级"),0.02,"错误"))))=IF(AND(F7="特大型",G7="中级及普
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 16:36:51
EXCEL2003 if函数只有7组,8个IF怎么用?=IF(AND(F7="特大型",G7="高级"),0.03,IF(AND(F7="大型",G7="高级"),0.01,IF(AND(F7="中型",G7="高级"),0.05,IF(AND(F7="小型",G7="高级"),0.02,"错误"))))=IF(AND(F7="特大型",G7="中级及普
EXCEL2003 if函数只有7组,8个IF怎么用?
=IF(AND(F7="特大型",G7="高级"),0.03,IF(AND(F7="大型",G7="高级"),0.01,IF(AND(F7="中型",G7="高级"),0.05,IF(AND(F7="小型",G7="高级"),0.02,"错误"))))
=IF(AND(F7="特大型",G7="中级及普通级"),0.03,IF(AND(F7="大型",G7="中级及普通级"),0.01,IF(AND(F7="中型",G7="中级及普通级"),0.05,IF(AND(F7="小型",G7="中级及普通级"),0.02,0))))
以上两组函数怎么合并或实现以上功能?
EXCEL2003 if函数只有7组,8个IF怎么用?=IF(AND(F7="特大型",G7="高级"),0.03,IF(AND(F7="大型",G7="高级"),0.01,IF(AND(F7="中型",G7="高级"),0.05,IF(AND(F7="小型",G7="高级"),0.02,"错误"))))=IF(AND(F7="特大型",G7="中级及普
这样试一下是不是你要的公式
=IF(G7="高级",IF(F7="特大型",0.03,IF(F7="大型",0.01,IF(F7="中型",0.05,IF(F7="小型",0.02,"错误")))),IF(G7="中级及普通级",IF(F7="特大型",0.03,IF(F7="大型",0.01,IF(F7="中型",0.05,IF(F7="小型",0.02,)))),""))
或
=IF(G7="高级",VLOOKUP(F7,{"特大型",0.03;"大型",0.01;"中型",0.05;"小型",0.02},2,),IF(G7="中级及普通级",VLOOKUP(F7,{"特大型",0.03;"大型",0.01;"中型",0.05;"小型",0.02},2,),""))
使用vba编辑个函数吧。或是用建立一个表格或数组专门用于这个查询然后用vlookup。
我仔细看了您的公式,发现可以这样写=IF(AND(F7="特大型",OR(G7="高级",G7="中级及普通级")),0.03,IF(AND(F7="大型",OR(G7="高级",G7="中级及普通级")),0.01,IF(AND(F7="中型",OR(G7="高级",G7="中级及普通级")),0.0...
全部展开
使用vba编辑个函数吧。或是用建立一个表格或数组专门用于这个查询然后用vlookup。
我仔细看了您的公式,发现可以这样写=IF(AND(F7="特大型",OR(G7="高级",G7="中级及普通级")),0.03,IF(AND(F7="大型",OR(G7="高级",G7="中级及普通级")),0.01,IF(AND(F7="中型",OR(G7="高级",G7="中级及普通级")),0.05,IF(AND(F7="小型",OR(G7="高级",G7="中级及普通级")),0.02,"错误"))))
另外,最后一个IF中,您写的两个代码有冲突呀。
原因是您的数据大部分都是重复的。如果不重复就只能用上面的两种办法了。
收起
在2003中是没有办法的,只能嵌套6层
=IF(AND(F7="特大型",or(G7="高级",G7="中级及普通级"),0.03,IF(AND(F7="大型",or(G7="高级",G7="中级及普通级"),0.01,IF(AND(F7="中型",or(G7="高级",G7="中级及普通级"),0.05,IF(AND(F7="小型",or(G7="高级",G7="中级及普通级")),0.02,"错误"))))
第一个公式写到某列(如H列)、错误改为0、
第二个公式写到第一个公式的后一列(I列)
在第二个公式后面(J列)写=H1+I1
从你的公式来看,你根本就不管G7是什么,只按F7进行判断即可
=if(f7="特大型",0.03,if(f7="大型",0.01,if(f7="中型",0.05,if(f7="小型",0.02,"错误"))))
这样只需要四层即完成了