Page 166 - Excel Workbook for Dummies
P. 166
17_798452 ch12.qxp 3/13/06 7:33 PM Page 149
Chapter 12
Using the
Logical Functions
In This Chapter
Finding how the Logical functions operate
Using Logical functions to create decision-making formulas
Using Logical functions to create formulas that trap errors
he Logical function category is a small but powerful group of six functions (TRUE, FALSE,
TIF, AND, OR, and NOT) that you can use in decision-making formulas. (A decision-making
formula is one where one set of values should be used or action taken when a particular
condition is met and another when it is not.) You can also combine them with certain
Information functions (such as ISBLANK, ISNUMBER, ISTEXT, and ISERROR) to create error-
trapping formulas that prevent Excel error values (especially #DIV/0!, #NUM!, and #VALUE!
errors) from spreading to other dependent formulas in the spreadsheet.
In this chapter, you get a chance to practice using the Logical functions in spreadsheets to
create both decision-making and error-trapping formulas.
Working with the Logical Functions
The Logical functions, as their name implies, deal exclusively with the Logical values of
TRUE and FALSE. With the exception of the TRUE, FALSE, and NOT functions (whose only
purpose is to enter the Logical values, TRUE, FALSE, and its opposite into a cell of the work-
sheet), the other three Logical functions, IF, AND, and OR, evaluate expressions entered as
their arguments as either TRUE or FALSE.
The granddaddy of all the Logical functions is the IF function, which follows this syntax:
IF(logical_test,value_if_true,value_if_false)
The IF function works by evaluating a comparative expression that you enter as its logical_
test argument as being either TRUE or FALSE. If the expression is found to be TRUE, Excel
then uses the value or text or executes the expression you enter as the value_if_true argu-
ment of the function. If the expression is found to be FALSE, the program uses the value or
text or executes the expression you enter as the value_if_false argument.