When I want to import data using VBA I use following command
Dim FinalArray As Variant
ArrayData = Range("DATA").Value
I also tried doing with the loop, but got error in this place (newData (0, newii))
Dim Data As Variant
Dim newData As Double
Dim i As Long
Data= Range("horiz2").Value
For i= 0 To 11 Step 1
newData (0, newii) = Data(1, i+1)
Next i
When I run this code, I have data stored as Variant/Variant (1 to 1, 1 to 12) type. At the same time, I notice that while doing some calculations inside the macro, I have a table X where the same values are in Double(0 to 0, 0 to 11) type.
- How can I import data from a range in Double format - (Double(0 to 0, 0 to 11) to Variant/Variant (1 to 1, 1 to 12))
- How can I transform the table in Double format to Variant (Variant/Variant (1 to 1, 1 to 12) to Double(0 to 0, 1 to 12))?