How to Use OR Function in Excel: Simple Guide
Use the
OR function in Excel to check if any of multiple conditions are true. It returns TRUE if at least one condition is true, otherwise FALSE. The syntax is =OR(condition1, condition2, ...).Syntax
The OR function tests multiple conditions and returns TRUE if any condition is true, otherwise FALSE.
- condition1, condition2, ...: These are the logical tests you want to check. You can have 1 to 255 conditions.
excel
=OR(condition1, condition2, ...)
Example
This example checks if a number in cell A1 is less than 10 or greater than 20. It returns TRUE if either condition is true, otherwise FALSE.
excel
=OR(A1<10, A1>20)
Output
TRUE or FALSE depending on A1 value
Common Pitfalls
One common mistake is using OR without proper logical conditions, like missing comparison operators. Another is confusing OR with AND, which requires all conditions to be true.
Wrong: =OR(A1, B1) (this checks if A1 or B1 are non-zero, not logical tests)
Right: =OR(A1>5, B1=10)
excel
=OR(A1, B1) =OR(A1>5, B1=10)
Output
First returns TRUE if A1 or B1 are non-zero; second returns TRUE if A1>5 or B1=10
Quick Reference
| Function | Description | Example |
|---|---|---|
| OR | Returns TRUE if any condition is TRUE | =OR(A1>5, B1<10) |
| AND | Returns TRUE only if all conditions are TRUE | =AND(A1>5, B1<10) |
| NOT | Reverses the logical value | =NOT(A1>5) |
Key Takeaways
Use OR to check if any one of multiple conditions is true.
OR returns TRUE if at least one condition is true, otherwise FALSE.
Conditions must be logical expressions like A1>5 or B1="Yes".
Do not confuse OR with AND; AND requires all conditions true.
Combine OR with IF to create flexible decision formulas.