Page 167 - Excel Workbook for Dummies
P. 167
17_798452 ch12.qxp 3/13/06 7:33 PM Page 150
150 Part II: Using Formulas and Functions
When entering a number or reference to a cell that contains a number or formula
that returns a number for the value_if_true and value_if_false arguments, you simply
enter the value or cell address. When entering text for these arguments, you need to
enclose the text in a set of double quotation marks. And when entering an expression,
you enter the operands and operator or function name and arguments as you would
in any formula.
Constructing Decision-Making Formulas
The biggest use for the IF function is performing conditional operations in a formula,
one set of operations when the IF condition expressed by its logical_test argument is
found to be TRUE and another when it is not. These decision-making formulas can
be one of two types: formulas that perform their computations using alternate values
depending upon the outcome of the condition or those that perform alternate calcula-
tions based on the outcome.
Selecting between alternate values
Figure 12-1 shows an example of the first type of decision-making formula, where
alternate values can be put to good use. The spreadsheet shown in this figure con-
tains a variation of the Tip Lookup worksheet you encountered in Chapter 11. In this
version, the Tip Schedule contains tip amounts for alternate tip percentages (15% in
column C and 20% in column D), and the input section of the spreadsheet contains a
Tip Percentage cell (G2), where the user can specify either a tip percentage of 15 or
20 percent.
Figure 12-1:
The Tip with
alternate
15% and
20% tip
percentages.