Microsoft Office Tutorials and References

In Depth Information

**Using the TRUE and FALSE Functions**

Figure 12.6.

Figure 12.6.
This formula contains four nested

This formula contains four nested IIF functions.

functions.

Using the

Using the
TRUE

Functions

There are two remaining functions in the logical group, but you should not

need to use either of them. If you encounter a function with either the TRUE

or FALSE function, you can replace the function with the value TRUE or

FALSE. Microsoft added TRUE and FALSE to provide compatibility with oth-

er vendors
’
spreadsheet programs.

A formula such as =IF(OR(A2>5,B2=0),TRUE(),FALSE()) can be rewritten as

=IF(OR(A2>5,B2=0),TRUE,FALSE). If you are trying to return TRUE or FALSE,

you can simply use the Boolean expression: =OR(A2>5,B2=0).

TRUE
and

and
FALSE

FALSE
Functions

Using the

Using the
NOT

NOT
Function to Simplify the Use of

Function to Simplify the Use of
AND

AND
and

and
OOR

In the language of Boolean logic, there are typically NAND, NOR, and XOR

functions, which stand for Not And, Not Or, and Exclusive Or. To simplify

matters, Excel offers the NOT function.

Syntax

NOT(logical)

Quite simply, NOT reverses a logical value. TRUE becomes FALSE, and

FALSE becomes TRUE when processed through a NOT function.