Professional Documents
Culture Documents
Grade
A
B
C
* Note that each invoice will fall in only one of the two columns.
n the no. of days
Today's Date 12/14/2017
WE HAVE TO USE EITHER F4 OR $ SIGN FOR NUMBER OF DAYS
IF functions
IF functions are
are very
very useful
useful for
for performing
performing logic,
logic, and
and they
they vary
vary from
from simple
simple to
to complex.
complex. II will
will provide
provide aa few
few
examples.
examples.
To enter
To enter aa basic
basic IF
IF function:
function:
Enter the
Enter the formula
formula =IF(condition,expression1,expression2),
=IF(condition,expression1,expression2), wherewhere condition
condition isis any
any condition
condition that
that isis either
either true
true or
o
false, expression1 is the value of the formula if the condition is true, and expression2 is the value of the formula ii
false, expression1 is the value of the formula if the condition is true, and expression2 is the value of the formula
the condition
the condition isis false.
false.
Asimple
A simple example
example isis =IF(A1<5,10,“NA”).
=IF(A1<5,10,“NA”). Note
Note that
that ifif either
either of
of the
the expressions
expressions isis aa label
label (as
(as opposed
opposed to
to aa numeri
numeri
value), it should be enclosed in double quotes.
value), it should be enclosed in double quotes.
Try it!
Try it! Enter
Enter appropriate
appropriate IF
IF formulas
formulas in
in columns
columns CC and
and D.
D. (Scroll
(Scroll to
to the
the right
right to
to see
see the
the answer.)
answer.)
Sometimes IF
Sometimes IF functions
functions are
are nested.
nested. For
For example,
example, there
there might
might be
be three
three possibilities,
possibilities, depending
depending onon whether
whether the
the
value in cell A1 is negative, zero, or positive. A nested IF formula can then be used as follows.
value in cell A1 is negative, zero, or positive. A nested IF formula can then be used as follows.
To use
To use nested
nested IF
IF functions:
functions:
Enter the
Enter the formula
formula =IF(condition1,expression1,IF(condition2,expression2,expression3)).
=IF(condition1,expression1,IF(condition2,expression2,expression3)). IfIf condition1
condition1 isis true,
true, th
th
relevant value is expression1. Otherwise, condition2 is checked. If it is true, the relevant value is expression2.
relevant value is expression1. Otherwise, condition2 is checked. If it is true, the relevant value is expression2.
Otherwise, the
Otherwise, the relevant
relevant value
value isis expression3.
expression3.
An example
An example isis =IF(A1<0,10,IF(A1=0,20,30)).
=IF(A1<0,10,IF(A1=0,20,30)). Suppose
Suppose this
this formula
formula isis entered
entered in
in cell
cell B2.
B2. Then
Then ififA1
A1 contains
contains aa
negative number, B2 contains 10. Otherwise, if A1 contains 0, B2 contains 20. Otherwise (meaning
negative number, B2 contains 10. Otherwise, if A1 contains 0, B2 contains 20. Otherwise (meaning that A1 that A1 must
must
contain aa positive
contain positive value),
value), B2
B2 contains
contains 30.
30.
Try it!
Try it! Use
Use aa nested
nested IF
IF function
function to
to fill
fill in
in the
the grades
grades in
in column
column C.
C. (Scroll
(Scroll to
to the
the right
right to
to see
see the
the answer.)
answer.)
omplex. II will
omplex. will provide
provide aa few
few For each product, if the end inventory is less than or equal to 50 units,
enough units are ordered to bring stock back up to 200; otherwise, no
units of that product are ordered
ee the
ee the answer.)
answer.)
es, depending on
s, depending on whether
whether the
the
ed as follows.
d as follows. Each student gets an A (if score is 90 or above), S for satisfactory (if score
if 60 or above but less than 90) or U for unsatisfactory if score is below 60
ght to see
ht to see the
the answer.)
answer.)
han or equal to 50 units,
up to 200; otherwise, no
# of units ordered
-
160
180
-