英文:
Formula Parse Error in IF nesting function google sheets
问题
这是公式:
=IF(E2<30001, E20.05, IF(E2<60001, 300000.05+(E2-30000)0.1, 300000.05+30000*0.1+(E2-60000)*0.2))
它一直出现解析错误,我无法弄清楚原因 你能帮忙吗?
我已尝试检查语法错误,并拆分公式,但没有成功。我用";"替换了",",但然后我收到了一个 #N/A 错误:IF 函数的参数数量错误。预期为 2 到 3 个参数,但提供了 4 个参数。
英文:
This is the Formula:
=IF(E2<30001, E20.05, IF(E2<60001, 300000.05+(E2-30000)0.1, 300000.05+30000*0.1+(E2-60000)*0.2))
It keeps bringing up parse errors and I cannot figure out why Can you help?
I have try checking for Syntax errors, and splitting the Formula up, but that wasn´t successful. I replaced the "," with ";" but then i receicve an #N/A error: Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 4 arguments.
答案1
得分: 1
Use semicolons instead of commas:
=IF(E2<30001; E2*0.05; IF(E2<60001; 30000*0.05+(E2-30000)*0.1; 30000*0.05+30000*0.1+(E2-60000)*0.2))
英文:
Use semicolons instead of commas:
=IF(E2<30001; E2*0,05; IF(E2<60001; 30000*0,05+(E2-30000)*0,1; 30000*0,05+30000*0,1+(E2-60000)*0,2))
答案2
得分: 0
=IF(E2<30001, E2*0.05, IF(E2<60001, 300000.05+(E2-30000)0.1, 300000.05+300000.1+(E2-60000)*0.2))
英文:
=IF(E2<30001, E20.05, IF(E2<60001, 300000.05+(E2-30000)0.1, 300000.05+30000*0.1+(E2-60000)*0.2))
I can see a few errors in your formula, The Second argument "E20.05" please check that once if you want it to be E2*0.05 or something like that, you're not using the multiplication symbol.
The second argument inside the nested IF is "300000.05+(E2-30000)0.1"
In this as well you are missing a multiplication sign right after the bracket. based on my understanding it should be written as 300000.05+(E2-30000)*0.1
Additionally please check your formula once again, it is unclear to me whether you have used dot (.) for multiplication instead of asterisk (*), in google sheets a dot will just mean decimal point. In case you have used dot as a decimal point then as per me the corrected formula will be
=IF(E2<30001, E2*0.05, IF(E2<60001, 300000.05+(E2-30000)*0.1, 300000.05+30000*0.1+(E2-60000)*0.2))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论