IF returns one value if a condition you specify is true and another value if it evaluates to false.
SYNTAX:
IF(Condition,TrueResult, FalseResult)
Condition: What Value you are testing to be either true or false, such as variable, number, equation, or mathematical statement
TrueResult: Expression which determines what to display if the Condition is true
FalseResult: Expression which determines what will be displayed if the Condition is
NOTES:
TrueResult and FalseResult may be cell references, numeric values, numeric expressions (calculations), String expressions, or other IF Statements.
EXAMPLES:
IF(D5>120,E5,F5) This statement says "if the value in cell D5 is greater than 120, then display the value in cell E5, otherwise (else), display the value of cell F5".
IF(AND(D5>120,D5<200,D5<>150),D5,"") If D5 is greater than 120 AND Less Than 200 and Not equal to 150 THEN output D5 ELSE output "" (blank).
IF(OR(D5>120,D6>120,D7>120),1,0) If D5 is greater than 120 or D6 is greater than 120 or D7 is greater than 120 THEN 1 ELSE 0.
IF(NOT(ISBLANK(B1)), B1, 1) If B1 is NOT Blank THEN B1 ELSE 1
IF(GAVG(1,1,"M")>20, 40, 30) If the Monthly average for variable 1 is greater than 20 THEN 40 ELSE 30
STR(if(B4=1,"ONE",if(B4=2,"TWO",if(B4=3,"THREE","INVALID NUMBER"))))
VAL(if(C4="ONE",1,if(C4="TWO",2,if(C4="THREE",3,-1))))
Download Example Template: Help_IF_Function.ss3 (Click here for download instructions)