Lesson for Day Fifteen
In this lesson, we
will review and learn to:
Format
a system date
Use
the IF function
Microsoft Excel stores dates as sequential numbers known as serial
values. Excel stores times as decimal fractions because time is considered a
portion of a day. Dates and times are values and, therefore, can be added,
subtracted, and included in other calculations. For example, to determine the
difference between two dates, you can subtract one date from the other. You can
view a date as a serial value and a time as a decimal fraction by changing the
format of the cell that contains the date or time to General format.
Excel supports two date systems: the 1900 and 1904 date systems. The
default date system for Microsoft Excel for Windows is 1900. To change to the
1904 date system, click Options on the Tools menu, click the Calculation
tab, and then select the 1904 date system check box.
The following table shows the first date and the last date for each
date system and the serial value associated with each date.
Date |
|
|
1900 |
January 1, 1900 |
December 31, 9999 |
1904 |
January 2, 1904 |
December 31, 9999 |
Returns one value if a condition you specify evaluates to TRUE and
another value if it evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas.
Syntax
IF(logical_test,value_if_true,value_if_false)
Logical_test is any value or expression that
can be evaluated to TRUE or FALSE. For example, A10=100 is a logical
expression; if the value in cell A10 is equal to 100, the expression evaluates
to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use
any comparison calculation operator.
Value_if_true is the value that is returned if
logical_test is TRUE. For example, if this argument is the text string
"Within budget" and the logical_test argument evaluates to TRUE, then
the IF function displays the text "Within budget". If logical_test is
TRUE and value_if_true is blank, this argument returns 0 (zero). To display the
word TRUE, use the logical value TRUE for this argument. Value_if_true can be
another formula.
Value_if_false is the value that is returned if
logical_test is FALSE. For example, if this argument is the text string
"Over budget" and the logical_test argument evaluates to FALSE, then
the IF function displays the text "Over budget". If logical_test is
FALSE and value_if_false is omitted, (that is, after value_if_true, there is no
comma), then the logical value FALSE is returned. If logical_test is FALSE and
value_if_false is blank (that is, after value_if_true, there is a comma
followed by the closing parenthesis), then the value 0 (zero) is returned.
Value_if_false can be another formula.