Avatar of bail3yz
bail3yz
 asked on

excel if statement question

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
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Ingeborg Hawighorst (Microsoft MVP / EE MVE)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ingeborg Hawighorst (Microsoft MVP / EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jppinto

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))
bail3yz

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

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

Thanks again
Ingeborg Hawighorst (Microsoft MVP / EE MVE)

Or, shorter

=IF(AND(A50=$A$32,C50=$C$32,E50=$E$32),IF(E50<>"UD",20,10),0)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy