Array is data structure that contains a group of elements. And is used to store group of variables.
In VBA, array element (variable) can be accessed by using array name and index number.
Since index number is sequential, it's used in conjunction with loop to quickly iterate through variables.
To give an example. You can put range of values from sheet into array.
Table.JPG
Above will create two-dimentional array, index starting from 1 (Base 1).
The array has 5 rows and 3 columns. In array, element in row 2, column 3 can be accessed like below.
You can find detailed explanation in links below.
https://www.tutorialspoint.com/vba/vba_arrays.htm
http://analystcave.com/vba-vba-array/
Bookmarks