Excel VBA Tutorial Part 7 - VBA Operators & Built-In Functions


Excel VBA Operators

There are a number of built-in VBA operators that can be used in Excel VBA code. These are mathematical operators, string operators, comparison operators and logical operators. These are discussed individually below.


Mathematical Operators

The main Mathematical VBA operators are listed in the table below. Note that, the precedences that are listed alongside the operators are the defaults, which are applied in the absence of brackets. However, the order in which the VBA operators are applied can be controlled by adding brackets to an expression:



String Operators

The main string operator in Excel VBA is the concatenate operator, &:



VBA Comparison Operators

Comparison operators compare two numbers or strings and return a logical (True or False) result. The main Excel VBA comparison operators are listed in the table below:



VBA Logical Operators

Comparison operators also return a logical (True or False) result. The main Excel VBA logical operators are listed in the table below:



It should be noted that the above tables are not an exhaustive list of VBA operators. A more complete list can be obtained from the Visual Basic Developer Center Website


Built-In Functions

VBA also has a large number of built-in functions that are available to be used in your VBA code. Some of the more commonly used VBA functions are listed below.



Note that the above list only provides a selection of the more commonly used Excel Visual Basic built-in functions. If you want a more comprehensive list of the VBA functions available for use in your Excel Macros, this can be found on the Visual Basic Developer Center website or the Tech on the Net website.

Go To Excel VBA Tutorial Part 8 - Excel Objects

Return to the Excel VBA Tutorial Page

Valid XHTML 1.0 Transitional Valid CSS!
Disclaimer   Privacy Policy
Copyright © 2008-2014 ExcelFunctions.net