This Excel tutorial explains how to use the OR function with syntax and examples.
Excel OR Function Description
The Excel OR function tests a number of supplied conditions and returns TRUE if any of the conditions are TRUE. Otherwise, it returns FALSE.
- TRUE if ANY of the conditions evaluate to TRUE
- FALSE otherwise (i.e. if ALL of the conditions evaluate to FALSE).
Excel Or Function Examples
The following spreadsheet shows three examples of the Excel Or function.
Explanation: Based on the above examples, the OR function returns;
- the function in cell C1 evaluates to TRUE, as BOTH of the supplied conditions are TRUE;
- the function in cell C2 evaluates to TRUE, as the first condition, A2>0 evaluates to TRUE;
- the function in cell C3 evaluates to FALSE, as ALL of the supplied conditions are FALSE.
The syntax for the OR function
OR( logical_test1, logical_test2, ... logical_testn )
- A condition to test that can either be TRUE or FALSE.
logical_test1, ... logical_test_n
- Optional. Conditions to test that can either be TRUE or FALSE. There can be up to 30 conditions.
The OR function returns TRUE if any of the conditions are TRUE.
The OR function returns FALSE if all conditions are FALSE.