4.4 The OR Function (Module 4 Section 4.4)
The OR function is great to use when you only need one condition that needs to be met in order to get a TRUE result (FIGURE 1).
OR returns a TRUE output if any its arguments evaluate to TRUE. OR returns a FALSE output only if all of its argument inputs are FALSE.
OR returns a TRUE output if any its arguments evaluate to TRUE. OR returns a FALSE output only if all of its argument inputs are FALSE.
A common use for the OR function is to expand the usefulness of other functions that perform logical tests. For example, the IF function (we will cover it also) performs a logical test and returns one value if the test evaluates to TRUE and another value if the test evaluates to FALSE.
By using the OR function as the logical test argument of the IF function, you can test many different conditions instead of just one.
FIGURE 1
|
If any Function Argument input is TRUE, the output is TRUE.
SCENARIO: You have several patients who have received comprehensive exams and want to know who has a health condition that is Good (Blue Status) or Acceptable (Black Status).
Practice Exercise 6: Concerning the OR function, use the above table to construct arguments for each employee. Use the Insert Function dialog box to construct each argument.
STEP 1A: Enter data from OR table above. Then make cell C2 the active cell.
|
Ensure your data entered is in the same cells as in the example above.
|
STEP 1B: Make cell C2 the active cell.
|
STEP 2A: Select Insert Function. There are multiple ways to select the Insert Function.
|
FIGURE 3
|
STEP 3A: From the “Or select a category” drop-down arrow, select “Logical” (FIGURE 4).
STEP 3B: The Logical category functions will appear including the OR function. Ensure OR is highlighted. If you do not see it, scroll down. STEP 3C: Once visible, click it to highlight it. STEP 3D: Select the OK button. |
FIGURE 4
|
STEP 4A: Joe’s health condition color code is in cell B2; that will be our 1st argument.
Our scenario is checking if his security color classification is anything other than blue or black. STEP 4B: Enter: B2=”Blue” ARGUMENT #1 (FIGURE 5). B2=”Black” ARGUMENT #2 (You must enter quotes) STEP 4C: Select OK button. |
FIGURE 5
|
Notice that as you are entering the arguments, they are also being entered into cell C2 as shown by FIGURE 6.
|
FIGURE 6
|
STEP 5: Move mouse over to the bottom-right corner of cell C2 and Autofill down through cell C6 to obtain the OR results for the other patients (FIGURE 7).
|
FIGURE 7
|
STEP 6: Since Joe, John, Tom, and Susan have health conditions that were within the confines of this scenario, they had a TRUE result. James did NOT have an acceptable health condition, thus FALSE.
|
FIGURE 8
|
END OF PRACTICE EXERCISE 6