We help IT Professionals succeed at work.

excel if statement question

244 Views
Last Modified: 2012-05-11
I am trying to make an if statement in excel that has 3 outcomes (not even sure if thats possible?)

this is what I have so far

=IF(OR(AND(A50=$A$32,C50=$C$32, E50=$E$32, E50<>"UD"),AND(A50=$A$32,C50=$C$32, E50=$E$32)),20,10)

If AND(A50=$A$32,C50=$C$32, E50=$E$32, E50<>"UD") is true I want the cell to be 20
if AND(A50=$A$32,C50=$C$32, E50=$E$32) is true I want the cell to be 10
if neither are true I want the cell to be 0

right now the 10 / 20 is swapped?... I dont understand why that is?..

and I dont know how to add the condition for 0

Thanks
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Awarded 2010
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
TRy like this:

=IF(AND(A50=$A$32,C50=$C$32,E50=$E$32,E50<>"UD"),20,IF(AND(A50=$A$32,C50=$C$32,E50=$E$32),10,0))

Author

Commented:
Thank you!.. I almost figured that out myself :)

never used excel much.. not sure why I was using OR :)

Thanks again
CERTIFIED EXPERT
Most Valuable Expert 2011
Awarded 2010

Commented:
Or, shorter

=IF(AND(A50=$A$32,C50=$C$32,E50=$E$32),IF(E50<>"UD",20,10),0)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.