Use the OR function, one of the logical functions, to determine if any conditions in a test are TRUE.
Example

Technical Details
Examples
Here are some general examples of using OR by itself, and in conjunction with IF.
Formula | Description |
---|---|
=OR(A2>1,A2<100) | Displays TRUE if A2 is greater than 1 OR less than 100, otherwise it displays FALSE. |
=IF(OR(A2>1,A2<100),A3,”The value is out of range”) | Displays the value in cell A3 if it is greater than 1 OR less than 100, otherwise it displays the message “The value is out of range”. |
=IF(OR(A2<0,A2>50),A2,”The value is out of range”) | Displays the value in cell A2 if it’s less than 0 OR greater than 50, otherwise it displays a message. |
Sales Commission Calculation
Here is a fairly common scenario where we need to calculate if sales people qualify for a commission using IF and OR.
- =IF(OR(B14>=$B$4,C14>=$B$5),B14*$B$6,0) – IF Total Sales are greater than or equal to (>=) the Sales Goal, OR Accounts are greater than or equal to (>=) the Account Goal, then multiply Total Sales by the Commission %, otherwise return 0.