Excel nested if, and, or

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:32 PM GMT

Question

I am having trouble getting my if statement to work. Here is what I have IF(AND[JOB STATUS]="FT",[YRS EMPLOYED]>=1,5,IF[JOB STATUS]="FT",[YRS EMPLOYED]<1,3,IF(OR([JOB STATUS]="PT",[YRS EMPLOYED]>=1.5,3),0))) The Full time statement is working, but the part time is returning a 3 for all and if less than 1.5 years should be returning 0.

Answer

You haven't said what the logic is, but the formula appears to have brackets in the wrong place - I'm guessing

IF it is FT and employed for 1 year or more, then 5 else if FT and employed less than 1 year then 3 if Pt time or service greater than 1.5 years then 3

etc

The actual logic as above will help in confirming the actual order of brackets but

if(and(test1,test2),ValueForTrue,if(or(test1,test2),ValueForTrue,ValueForFalse)

is the sort of order of brackets I'd expect.

Advertisement

©2017 eLuminary LLC. All rights reserved.