i've a little problem while using if function while using on google sheet and i'm not able to find solution..
i want to put everycondition in function like
A2 is positive and B2 is positive then C2 Will show Positive
if A2 is positive and B2 is negative then C2 will show Positive
if A2 is negative and B2 is positive then C2 Will Show Negative
If both A2 and B2 Negative then C2 will show negative
i want to put all this condition on one formula or script which i can run on google app script
i've tried if function with AND, OR but did'nt able to solve please help me with this
CodePudding user response:
Try:
=IFS(AND(A2>0,B2>0),"Positive ",AND(A2>0,B2<0),"Positive",AND(A2<0,B2<0),"Negative ",AND(A2<0,B2>0),"Negative")