Reputation: 31
Is there a reason this is coming in as false? Below is the VBA output when debugging:
?A + B > X & A + B <= Y & C = 0
False
?A + B > X & A + B <= Y
True
?C=0
True
?A + B > X
True
?A + B <= Y
True
Upvotes: 0
Views: 411
Reputation: 14764
The problem you are running into here is that the ampersand &
is the string concatenation operator in VBA.
To evaluate logical conditions you must use the And
operator, like so:
?True And True
Upvotes: 2