Quote:
Originally Posted by Pecoflyer
Much better !
Enter
Code:
=IF(A3>0,A3+SIGN(B3)*B3,IF(B3>0,2*A3-B3,3*B3-A3))
in C3 and pull down as needed
|
Many thanks Pecoflyer for the help,
I wanted to code the conditions below:
if A3>0 and B3>0 then C3=10
If A3>0 and B3<0 then C3=20
If A3<0 and B3>0 then C3=30
If A3<0 and B3<0 then C3=40
I tried the formula below but sound not to produce the correct answer
=IF((A3>0&B3>0), 10, (IF((A3>0&B3<0), 20, IF(A3<0 & B3>0, 30, 40))))
Also, the formula that you have already provided sounds not to be generic, it fails to give the correct answer when A3>0 and B3<0
=IF(A3>0,10,IF(B3>0,30,40))
What might be the issue here?
Best
Jamal