What is the OR function?
=OR(logical1, [logical2], ...)OR returns TRUE when any condition is true and FALSE when all are false. Use it when meeting one of several conditions is enough, such as Reading or Math being 90 or more.
Like AND, it is usually placed in the condition of IF. Compare the results with AND using the same minimums to see the difference.
Arguments
- logical1
- The first condition that evaluates to TRUE or FALSE, for example B2>=90.
- logical2, ...
- Optional. Up to 255 conditions.
OR examples
Example 1. Either subject 90 or more
=OR(B2>=90, C2>=90)Liam has Reading 85 but Math 92, so TRUE. Emma is under 90 in both, so FALSE. This is how the sheet first opens.
Example 2. With IF
=IF(OR(B2<60, C2<60), "Retake", "Pass")"Retake" if either subject is under 60. That applies to Olivia (Reading 58) and Lucas (Math 55).
Example 3. One of several values
=OR(A2="Seoul", A2="Busan")TRUE if the branch is Seoul or Busan.
Common mistakes
Mixing it up with AND
OR is TRUE if just one is true. If all must hold, use AND.
Leaving out the cell in later comparisons
=OR(A2="Seoul", "Busan") does not work as expected. Write each comparison in full: A2="Busan".
Reversing the retake rule
"Retake if any is below" is OR(B2<60, C2<60); "pass if all pass" is AND(B2>=60, C2>=60). They are the same decision from opposite sides.
FAQ
- How many conditions?
- Up to 255.
- Exactly one of two?
- Use XOR. It is FALSE when both are true.
- Show words instead?
- Wrap it in IF: =IF(OR(B2>=90, C2>=90), "Has a top subject", "").