OR Function
Written by kazamraza
no comments
Classified in : Excel Formulas, Logical Functions
the OR function, one of the logical functions, to determine if any conditions in a test are TRUE.
Syntax
OR(logical1, logical2, logical3 ......)
The OR function returns True if any one logical test is true.
Normally the OR function is not used in isolation. it is used along with IF function.
◢ | A | B | C | D | E |
---|---|---|---|---|---|
1 | Data | Formula | Description (Result) | ||
2 | 50 | =OR(A2>1,A2<100) | Displays TRUE if A2 is greater than 1 OR less than 100, otherwise it displays FALSE. | ||
3 | 100 | =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". | ||
4 | =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. |