Microsoft Office Tutorials and References

In Depth Information

**Let’s Be Logical**

Figure 14-5:

Being

logical

about what

to choose.

Can you figure out how to accomplish the same thing using OR instead of

AND? Think for a moment and then look at the answer here:

=IF(OR(B4<1,B4>12),”That is not a month!”,

CHOOSE(B4,”January”, “February”, “March”,

“April”, “May”, “June”, “July”, “August”,

“September”, “October”, “November”,

“December”))

AND returns true when every condition is true. OR returns true when any

condition is true.

Here’s how to use AND or OR:

1. Click a cell where you want the result to appear.

2. Enter either
=AND(
or
=OR(
to start the function.

3. Enter one or more logical tests.

A test typically is a comparison of values in two cells or an equation,

such as A1 = B1 or A1 + B1 = C1. Separate the tests with commas.

4. Type a
), and press Enter.

If you enter the AND function, the result is true if all the tests are true.

If you enter the OR function, the result is true if at least one of the tests

is true.