OR
The OR function in Google Sheets is a powerful tool to determine whether any of the provided logical expressions are true. It returns true if any of the logical expressions are true, and false if all of the logical expressions are false. With the OR function, you can simplify the task of testing multiple conditions.
Function Syntax and Parameters
Syntax: OR(logical_expression1, [logical_expression2, ...])
Parameters:
logical_expression1: The first logical expression to evaluate.logical_expression2, ...: [Optional] Additional logical expressions to evaluate.
Step-by-Step Tutorial
-
Using
ORwith individual logical expressions:- Example:
=OR(TRUE, FALSE, FALSE) - Result:
TRUE
- Example:
-
Using
ORwith cell references containing logical values:- Example: If
A1containsTRUEandB1containsFALSE, then=OR(A1, B1)will returnTRUE.
- Example: If
-
Using
ORwith a combination of logical expressions and cell references:- Example: If
A1containsTRUE,B1containsFALSE, andC1containsTRUE, then=OR(A1, B1, C1)will returnTRUE.
- Example: If
Use Cases and Scenarios
- Conditional Formatting: Apply formatting to a cell if any of the specified conditions are true.
- Data Validation: Allow input that satisfies any of the specified conditions.
- Conditional Formulas: Perform calculations based on the evaluation of multiple logical expressions.
Related Functions
AND: Returns true if all of the provided arguments are logically true.NOT: Returns the logical negation of a provided logical expression.