+ Start a Discussion
Daniel BedardDaniel Bedard 

Complex IF Statements

I am trying to write a, IF statement in a formula that will evaluate as follows:
If field A is greater than or equal to 27 OR either field B OR field C are greater than or equal to 610, AND field D is equal to MG-UG, return the value of Option1” otherwise go to the next criteria and so on.

 
Below is what I used.  It did not return a syntax error but it also did not work.  I suspect the issue to be in the “either” part of the formula.
 
IF(Highest_ACT_Composite__c  >= 27 || ((Highest_SAT_I_Verbal__c >=610 ||(Highest_ERWS__c >=610)) && (Contains("MG-UG",(Student_Rec_Major_Code_1__c)))),"Business Math",
 
Any insights would be greatly appreciated.
 
JeffreyStevensJeffreyStevens
So - is the "AND Field D is equal to MG-UG" part of the first OR?
Is it an AND ?

So - is it stated like this?  Basicall - just one OR...
IF(Highest_ACT_Composite__c  >= 27 ||
      ((Highest_SAT_I_Verbal__c >=610 || Highest_ERWS__c >=610) &&
        (Contains("MG-UG",(Student_Rec_Major_Code_1__c))))
       )
    ,"All is True", "All is False"
)

or.... - is it like this?
IF((Contains("MG-UG",(Student_Rec_Major_Code_1__c))) &&
     (Highest_ACT_Composite__c  >= 27 || ((Highest_SAT_I_Verbal__c >=610 || Highest_ERWS__c >=610))),
    "All is True", "All is False"
)

See the difference?
 
Daniel BedardDaniel Bedard
Thank you Ryan The 2 components of the OR portion are the SAT Verbal and ERWS. The ACT and the Major are two separate conditions. Condition 1: ACT >=27 (if they took this test and scored 27 or more, they get “business math”) Condition 2: SAT 1 Verbal and ERWS >=610 (If they took either of these and scored 610 or higher, they get “Business Math” even if ACT is below 27) Condition 3: Major – MG-UG In essence, they have to have MG-UG as their major and either scored a 27+ on Act or a 610+ on either the SAT or ERWS in order to get “Business Math” Does this make sense? Daniel G. Bedard Project Manager MBA, PMP, ITIL UMass Lowell Information Technology Enterprise Applications 257 Salem Street, Suite M50 Lowell, MA 01854 Office: (978) 934 – 2718 Mobile: (978) 866- 8241