Microsoft Office Tutorials and References
In Depth Information
Displaying Values Based on a Certain Condition
happens to be the first function starting with the letter I, the blue
highlight you see in the screenshot lands on it. Then press Tab (not Enter), and you’ll see
what’s shown in Figure 4–14.
Figure 4–14. The caption identifies the elements of the function.
The Formula AutoComplete is trying to tell you the kinds of things that make up the
statement—things like logical tests. But for now we’re going to just type. Inside that
open parentheses type the following, and then press Enter:
You should see the word Pass in cell J12, as shown in Figure 4–15. We’ve done it. The
student has passed the exam—and again, while we knew that already, we’ve let the cell
make that decision, not us.
Figure 4–15. A passing grade—barely
Now type 60 in cell I12; the word Fail will now appear in cell J12.
Now I’ll explain what we’ve written. The
statement in its entirety reads as follows:
is called a logical test , which is the condition that the value in
cell I12 is asked to meet; that is, is the test score equal to or greater
than 65? If it is, then what? Well, then the word Pass appears in cell
J12—the cell in which we’ve placed this function.
, as it has been written, is called the value if true (see
the caption in Figure 4–14), which is the result that will appear in J12 if
the condition is met. Since in our first case, in which the student
scored 66, the condition is indeed met, Pass appears in the cell.