Hi,
I’m hoping someone can help me, I have looked online but to no avail.
I understand there is a quick way to populate an array in VBA, with values taken from a worksheet e.g.
2DArray= worksheets(“Sheet1”).range(“A1:A4”).value
The above populates a 1(column) x 4(elements) array (named 2DArray) with values taken from the worksheet in column A1 to A4.
My question, is it possible to populate 2DArray with another [worksheet] column of data (e.g. residing in cells C1 to C4) using the same command, but without having an empty column in 2DArray e.g.
2DArray= worksheets(“Sheet1”).range(“A1:A4” & “C1:C4”).value
Any help / assistance anyone can provide would be much appreciated.
Kind regards,
2016LM
I’m hoping someone can help me, I have looked online but to no avail.
I understand there is a quick way to populate an array in VBA, with values taken from a worksheet e.g.
2DArray= worksheets(“Sheet1”).range(“A1:A4”).value
The above populates a 1(column) x 4(elements) array (named 2DArray) with values taken from the worksheet in column A1 to A4.
My question, is it possible to populate 2DArray with another [worksheet] column of data (e.g. residing in cells C1 to C4) using the same command, but without having an empty column in 2DArray e.g.
2DArray= worksheets(“Sheet1”).range(“A1:A4” & “C1:C4”).value
Any help / assistance anyone can provide would be much appreciated.
Kind regards,
2016LM
Last edited: