Here you'll find information about Multi-Dimensional Arrays, the Split function and the Join function.

Multi-Dimensional Arrays

A two-dimensional array has 2 dimensions, rows and columns and uses two indexes. It can be compared to a table or a worksheet in Excel. One index represents the rows and the other index represents the columns. These are used when an element is required to be specified using two attributes, Note: The lower bound can be specified explicitly in either one or both the dimensions.
A worksheet is a two-dimensional array. The array contains Cells. You can find a cell specifying its horizontal dimension (row) and its vertical dimension (column): Cells(4,10) is equivalent to cell J4.

3-dimensional array

A third dimension could be the number of worksheets in a workbook:

Sheets(3).Cells(4,10). Written as a 3-dimensional array: arrArray(4,10,3) which means: arrArray(rows, columns, number of workheets). It is possible to have much more dimensions, up to 64 in VBA


Syntax: ArrayName = split(string [separator[, Length Limit[, Compare Mode]]])

The vba Split Function splits a string expression into a specified number of substrings, delimited by a character(s), which are returned as a zero-based one-dimensional array. This method does 2 things simultaneously: it defines an array and fills it with items.
arr=split("return a zero-based one-dimensional array", " ")
The input string is split at the separator " ", space, and the resulting array contains 5 elements: arr(0) to arr(4).


The vba Join Function joins the substrings contained in an array, and returns a string with the substrings separated by a delimited character(s). It has the following syntax: StrName = join(string, separator)

Dim arrFriends(0 To 2) As String
arrFriends(0) = "Jane"
arrFriends(1) = "Caitlin"
arrFriends(2) = "Sam"

Dim myFriends As String

'This produces the following string: "Jane, Caitlin, Sam"
myFriends = Join(arrFriends, ", ")

MsgBox myFriends