Page 170 - Excel Workbook for Dummies
P. 170
17_798452 ch12.qxp 3/13/06 7:33 PM Page 153
Chapter 12: Using the Logical Functions 153
17. Click the text box with your input message and drag it up until the top of the
message box is even with the top of the Tip Percentage cell, G2, and position its
left edge so that it’s now touching the cell’s drop-down button without obscuring
any part of it.
18. Type 12 in the Tip Percentage cell, G2, and then press Enter.
This time, Excel displays your custom error message in its error alert dialog box.
19. Select the Cancel button in the error alert dialog box to close it and restore the
current 15% entry to the cell.
20. Save your work in a new workbook called Solved12-1.xls in your Chapter 12
folder inside the My Practice Spreadsheets folder on your hard disk and then
close the workbook file.
Selecting between alternate calculations
In addition to selecting alternate values, you can use IF functions to perform alternate
calculations depending upon the outcome of the condition stated by its logical_test
argument. A common situation is to have Excel perform the calculation only when the
IF condition is TRUE and perform no computation when it is FALSE.
Figure 12-2 shows you an example of this situation. Here, you see a slightly different
version of the Spring Sale worksheet that you used in earlier exercises. This table
contains a Discounted column, which determines whether a furniture item is to be
discounted based on its suggested retail price listed in the Retail Price column. It
also contains a Discount Amount column, which computes the amount of the dis-
count only if the Discounted column indicates that the furniture item is eligible for
a discount.
Figure 12-2:
The Spring
Sale work-
sheet with
Discounted
and
Discount
Amount
columns.