AND

result = expr1 AND expr2

The logical 'AND' 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.
* This operator can also perform bitwise comparison on identically positioned bits in two numeric expressions.
* You can use the NOT operator for logical not.
* You can use the OR operator for logical or.
* You can use the XOR operator for logical exclusion.
* The equivalent Excel function is Application.WorksheetFunction.AND
* For the Microsoft documentation refer to learn.microsoft.com

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

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

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