Err 509 calc with IF command
brucine Posted messages 24779 Registration date Status Member Last intervention -
Hello,
I'm trying to create an IF statement in Calc, but I keep getting an error 509 and can't find it.
Here is my formula:
=IF(AND(B5>=1;B5<=40000);"C19";"0");IF(AND(B5>=40001;B5<=70000);"C20";"0")
1 answer
-
Finally I found it, if it can help, my correction :
=IF(AND(B5>=1,B5<=40000),C19,IF(AND(B5>=40001,B5<=70000),C20))-
Hello,
your thing still doesn't hold up: you understood well that 0 could not replace the second condition, but this one only has two arguments.
There is still a 0 or whatever you want missing after C20 if none of the ranges are filled.The thing is, it's not very elegant.
We don't know what the role of 1 is; it makes sense if B5 can be 0.5 or -4, but not if it's just to check that this cell indeed has a numeric content that is always at least equal to 1.
Even assuming the "validity" of this condition, if B5 is not <= 40000, it must be greater than it; there is no sense in testing twice:
=IF(B5>=1,IF(B5<=40000,C19,IF(B5<=70000,C20,0)),0)
-