Logical

OR Formula

OR returns TRUE if any one of its conditions is true, and FALSE only if all conditions are false. It is used inside IF to check if at least one criterion is met, such as flagging rows that match any of several categories, checking if a value falls outside a valid range, or testing multiple possible matches.

Syntax

OR(logical1, [logical2, ...])
ParameterDescription
logical1 Parameter of the OR function.
[logical2 (Optional.) Parameter of the OR function.
...] Parameter of the OR function.
Try OR in Viztab — free, no signup

Examples

Check for any matching status

Formula
=IF(OR(B2="Shipped", B2="Delivered"), "Complete", "In Progress")
Returns: "Complete" if the status is either "Shipped" or "Delivered"

Flag values outside a valid range

Formula
=IF(OR(A2<0, A2>100), "Out of Range", "Valid")
Returns: "Out of Range" if the value is less than 0 or greater than 100

Weekend detection

Formula
=IF(OR(WEEKDAY(A2)=1, WEEKDAY(A2)=7), "Weekend", "Weekday")
Returns: "Weekend" if the date is Saturday or Sunday

Common Errors

#VALUE!

One of the conditions is not a valid logical expression. Ensure all arguments evaluate to TRUE or FALSE.

Tips

Combine AND and OR

=IF(AND(A1>0, OR(B1="Yes", C1="Yes")), "Approved", "Denied") requires A1>0 AND at least one Yes.

OR in data validation

Use OR in custom data validation formulas to allow multiple valid options beyond what a dropdown list provides.

Alternative to nested IF

Instead of =IF(A1="X", TRUE, IF(A1="Y", TRUE, FALSE)), use =OR(A1="X", A1="Y") for cleaner logic.

Try OR in Viztab

Import your data and use OR with 370+ other formulas. No signup required.

Open Viztab

Related Formulas