Owner manual

Value Types” on page 36
The Elements of Formulas” on page 15
“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26
“Pasting from Examples in Help” on page 41
IF
The IF function returns one of two values depending on whether a specied
expression evaluates to a Boolean value of TRUE or FALSE.
IF(if-expression, if-true, if-false)
 if-expression: A logical expression. if-expression can contain anything as long as the
expression can be evaluated as a Boolean. If the expression evaluates to a number, 0
is considered to be FALSE, and any other number is considered to be TRUE.
 if-true: The value returned if the expression is TRUE. if-true can contain any value
type. If omitted (comma but no value), IF will return 0.
 if-false: An optional argument specifying the value returned if the expression is
FALSE. if-false can contain any value type. If omitted (comma but no value), IF will
return 0. If entirely omitted (no comma after if-false) and if-expression evaluates to
FALSE, IF will return FALSE.
Usage Notes
If the Boolean value of  if-expression is TRUE, the function returns the if-true
expression; otherwise it returns the if-false expression.
Both  if-true and if-false can contain additional IF functions (nested IF functions).
Examples
=IF(A5>=0, “Nonnegative, “Negative”) returns the text “Nonnegative” if cell A5 contains a number
greater than or equal to zero or a nonnumeric value. If cell A5 contains a value less than 0, the
function returns “Negative”.
=IF(IFERROR(OR(ISEVEN(B4+B5),ISODD(B4+B5), FALSE),), All numbers”, “Not all numbers”) returns the
text All numbers” if both cells B4 and B5 contain numbers; otherwise the text “Not all numbers.” This
is accomplished by testing to see if the sum of the two cells is either even or odd. If the cell is not a
number, the EVEN and ODD functions will return an error and the IFERROR function will return FALSE;
otherwise it will return TRUE since either EVEN or ODD is TRUE. So if either B4 or B5 is not a number
or Boolean, the IF statement will return the if-false expression, “Not all numbers”; otherwise it will
return the if-true expression All numbers.”
158 Chapter 7 Logical and Information Functions