Search code examples
arraysexcelvbamultidimensional-arrayassign

return an entire row of a multidimensional array in VBA to a one dimensional array


Is there any way to return the value of an entire row of a multidimensional array to a one dimensional array In VBA?

Something like, arr_1dim = arr_2dim(3,:) is a matlab expression for assigning the row 3 of arr_2dim array to arr_1dim in one single stretch.

Is there any similar less expensive method in Excel VBA?


Solution

  • No there is no VBA-function to get a row or column. You can only write it yourself, or take a look here:
    http://www.cpearson.com/excel/vbaarrays.htm