Thread: [Solved] Multiple If statements,
View Single Post
 
Old 07-30-2013, 02:24 PM
Jamal NUMAN Jamal NUMAN is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Nov 2010
Posts: 525
Jamal NUMAN is on a distinguished road
Question

Quote:
Originally Posted by Pecoflyer View Post
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
Attached Images
File Type: jpg Clip_478.jpg (61.3 KB, 39 views)
Attached Files
File Type: xlsx Q3.xlsx (10.0 KB, 8 views)
__________________
Jamal NUMAN, Jamal432@gmail.com, P.O.BoX: 731, Ramallah, West Bank.
Reply With Quote