IF,NESTED IF and STATISTICAL IF,NESTED IF and STATISTICAL
IF STATEMENTSIF STATEMENTS
GRADE 9 – BROWN DOVE
The IF function
•The IF function works by analyzing the data and
testing it on whether it will be true based on the
specific conditions set. Depending on the
outcome, the function will display specific results
on selected cells.
Comparison Operators in Excel
These are the different comparisons that can be used
in the logical test part of the IF function.
SYMBOL MEANING
< Less than
> Greater Than
<= Less than or Equal to
>= Greater than or Equal to
<> Not Equal to
The IF function syntax
=IF(logical_test, value_if_true,value_if_false)
The NESTED IF function
•The Nested IF function is used when there is
more than one condition with two or more
possible outcomes. The syntax is almost the
same with the IF function except for “nesting” a
secondary formula under the main formula.
The NESTED IF function syntax
=IF(1
st
logical test, 1
st
value true, IF (2
nd
logial test, 2
nd
value true, value false))
Note: Microsoft Excel 2010 allows the user to nest up to 64 functions.
The STATISTICAL IF function
•Statistical IF statements can be used to display text or do
calculations in a cell only if it’s in the maximum or
minimum range.
•In using Statistical If statements, there are two types of
cell referencing. The first is a reference to a person’s
figure and is relative. The second represents the range of
everyone’s figures and is therefore absolute.
The STATISTICAL IF function syntax
=IF(B2=MAX($B$2:$B$4),”Top”,””)
=IF(B2=MIN($B$2:$B$4),”Top”,””)