2. IF Function
Allocates value to a cell according to the results of a condition
= IF (Condition, Value_if_true, Value_if_false)
The condition is any
express that can be
either true or false
The operator
=,>,>=,<,<= and <> are
used in most values,
cell references or
formulas/functions
Value _if_true
The value that wil be placed
in the cell if the condition is
true
Value_if_false
The value that will be
placed in the cell if the
condition is false.
= IF (D2 > 5, “Bonus”, “No Bonus”)
4. Operators
= Equal to > greater than < less than
=< equal and
great than
>= equal to and
less than
<> "not equal",
either less than
or greater than
5. Examples of IF Functions
= IF (D2 >10,15,10) Number reference
= IF (D2 >50,D2,E2) Cell Reference
= IF (A2>=40,”PASS”,”FAIL”) Text value
= IF(D2>10,C2*0.15,C2*01) Formula
=IF (C3=“Principal”, ”Guest of honor”,””) Text value
=IF (B2<1000,MAX(A2:A10),AVERAGE (A2:A10) Function