VBA Array Functions

VBA Array Functions in Excel

VBA Array Functions in Excel. These are different VBA Built-In functions. Those are LBound, UBound, IsArray, Erase, Split, Join and Filter. VBA Programmers use these functions in arrays to fasten process.

Lower Bound(LBound) Function

Let us see about VBA arrays lower bound or LBound function in Excel VBA. The LBound function represents the lower bound value of an array. It returns the smallest subscript(Index) value of specified array. It helps to determine the existing an array starting size.

Syntax of the LBound Function

Here is the Syntax of the LBound Function in Excel VBA.

LBound(ArrayName,[Dimension])

Where ArrayName: It is a mandatory argument. The ArrayName argument represents the name of an array.
Dimension: It is an optional parameter. The Dimension argument represents the dimension of an array.

Read more details about an array LBound function … VBA LBound Function

Upper Bound(UBound) Function

Let us see the VBA arrays upper bound or UBound function in Excel VBA. The UBound function represents the upper bound value of an array. It returns the highest subscript(Index) value of specified array. It helps to determine the existing an array size.

Syntax of the UBound Function

Here is the Syntax of the UBound Function in Excel VBA.

UBound(ArrayName,[Dimension])

Where ArrayName: It is a mandatory argument. The ArrayName argument represnts the name of an array.
Dimension: It is an optional parameter. The Dimension argument represents the dimension of an array.

Read more details about an array UBound function … VBA UBound Function

IsArray Function

Let us know about VBA IsArray function in Excel VBA. The IsArray function checks the specified value is an array or not. It returns a Boolean value either True or False.

Read more details about an array IsArray function … VBA IsArray Function

Erase Function

Here is the overview of VBA Erase statement. The Erase function is used to reset(reinitialize) the size of an array. It depends on type of an array.

Read more details about an array Erase function … VBA Erase Function

Split Function

Let us know more details about split function. The Split function helps us to know the number of values in an array by using delimiter.

Read more details about an array split function … VBA Split Function

Join Function

The Join function joins number of substrings contained in an array and returns a single string.

Syntax of the Join Function

Here is the Syntax of the Join Function in Excel VBA.

Join(SourceArray, [delimiter]) 

Where SourceArray: Required parameter. It represents substrings to be joined. It must be 1-dimensional array.
delimiter: An optional parameter. Space is the default delimiter. It represents string character, used to separate the substrings while returning the string.

Read more details about an array join function … VBA Join Function

Filter Function

The filter function returns an array, which contains subset of string based on specified criteria.

Syntax of the Filter Function

Here is the Syntax of the Filter Function in Excel VBA.

Filter(SourceArray, Match, [Include], [Compare] ) 

Where SourceArray: Required parameter. The array of strings to be searched. It shouldn’t be null.
Match: Required parameter. The string to search for.
Include: An optional Boolean parameter. It represents to include or exclude the matching string.
Compare: An optional parameter. It represents type of comparison(Binary or Textual or Database).

Instructions to Run VBA Macro Code or Procedure:

You can refer the following link for the step by step instructions.

Instructions to run VBA Macro Code

Other Useful Resources:

Click on the following links of the useful resources. These helps to learn and gain more knowledge.

VBA Tutorial VBA Functions List VBA Arrays in Excel Blog

VBA Editor Keyboard Shortcut Keys List VBA Interview Questions & Answers

Leave a Reply