In MatLab, I could fill an array using the following syntax My_Array = [1, 2, 3; 4, 5, 6; 7, 8, 9; 8, 7, 6] which would result the 4 x 3 matrix as follows.
|1 2 3|
|4 5 6|
|7 8 9|
|8 7 6|
I cannot seem to find the equivalent column separator (the colon [;] in MatLab) for VBA's array function.
1) Does it exist and if so what is it?
2) How might I create an array this way without using code such as
My_Array(1,1)=1
My_Array(2,1)=4
My_array(3,1)=7
My_array(4,1)=8
I would prefer not to use a loop as the values I need to enter are often text nor would prefer (in some cases) to enter the values into a spreadsheet and use a loop to fill the array. Obviously, if that is the only way then that is what I will have to do, but I would be much appreciative if someone could tell me how to do it otherwise.
Thanks in advance.
Bookmarks