Assume we need to store below data in an array.
Then here is the quickest way to do that
Sub Quick_MultidimensionalArrays() Dim WS As Worksheet Set WS = Worksheets("Sheet1") Dim All_Data() As Variant All_Data = WS.Range("A2", "E19") Erase All_Data End Sub |
However there is a very important thing you need to remember if you create array in this way. It is that if you create an array in this way, index of array will start from 1 and not from 0.
Also you can replace
All_Data = WS.Range("A2", "E19") |
with below
All_Data = WS.Range("A2:E19") |