OR

result = expr1 OR expr2

The logical 'OR' operator (Boolean).


expr1The first expression evaluating to either True or False (Boolean).
expr2The second expression evaluating to either True or False (Boolean).

REMARKS
* This is an Operator.
* The result is True if either (or both) evaluate to True.
* You can use the AND operator for logical and.
* You can use the NOT operator for logical not.
* You can use the XOR operator for logical exclusion.
* The equivalent Excel function is Application.WorksheetFunction.OR
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print True Or False        '= True  
Debug.Print True Or True '= True
Debug.Print False Or False '= False
Debug.Print False Or True '= True
Debug.Print (1 = 2) Or (1 = 1) '= True
Debug.Print 1 = 2 Or 1 = 1 '= True
Debug.Print 1 Or 0 '= 1
Debug.Print 1 Or -1 '= -1

Debug.Print True Or Null '= True
Debug.Print Null Or True '= True
Debug.Print False Or Null '= Null
Debug.Print Null Or False '= Null
Debug.Print Null Or Null '= Null

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top