Err 509 calc with IF command
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))-
-
@brucine
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)
-