VBA - Operators
VBA - Operators
VBA - Operators
An Operator can be defined using a simple expression - 4 + 5 is equal to 9. Here, 4 and 5 are called
operands and + is called operator. VBA supports following types of operators −
Arithmetic Operators
Comparison Operators
Show Examples
% Modulus operator and the remainder after an integer division B % A will give 0
Show Examples
Checks if the value of the two operands are equal or not. If yes,
= (A = B) is False.
then the condition is true.
Checks if the value of the two operands are equal or not. If the
<> (A <> B) is True.
values are not equal, then the condition is true.
Checks if the value of the left operand is greater than the value
> (A > B) is False.
of the right operand. If yes, then the condition is true.
Checks if the value of the left operand is less than the value of
< (A < B) is True.
the right operand. If yes, then the condition is true.
Checks if the value of the left operand is less than or equal to the
<= (A <= B) is True.
value of the right operand. If yes, then the condition is true.
Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified
expert to boost your career.
Show Examples
Show Examples
Note − Concatenation Operators can be used for both numbers and strings. The output depends on the
context, if the variables hold numeric value or string value.