Reputation: 7158
I'm trying to place the above formula on Google sheets:
=IF((L2 > 0 && !(L48 >= 0) && !(L94 >= 0)) || (L2 == 0 && L48 >=0 && L94 >= 0), False, L1)
But all I'm getting is:
Error: Formula parse error.
According to benlcollins site my problem can be due to:
I don't understand what is the problem with my formula.
Thanks for the help.
Upvotes: 1
Views: 159
Reputation: 34255
It looks as though you're trying to enter a formula into the sheet using Javascript syntax. Google sheets inherits the syntax for formulas from Excel and it's completely different.
Some of the differences are:-
So if you apply it to your formula you get:
=IF(or(and(L2 > 0 , not(L48 >= 0) , not(L94 >= 0)) , AND(L2 = 0, L48 >=0 , L94 >= 0)), False, L1)
It might be worth adding that you will only get 'false' if the specific condition stated in the first part of your IF statement is satisfied - otherwise the IF will default to the second alternative result, L1. It would be more common to use an IF with only two arguments in a situation like this, so if the condition is satisfied you get the result stated, otherwise it defaults to false:
if(<condition>,<result>) <= gives false if condition not satisfied.
Upvotes: 2