Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Array <--- Range
If Test is defined as a contiguous three-cell column, this macro works:
Sub Foo() Dim rngTest As Range, saTest() As String Set rngTest = ThisWorkbook.Names("Test").RefersToRange ReDim saTest(1 To 3, 1) saTest(1, 1) = "a" saTest(2, 1) = "b" saTest(3, 1) = "c" rngTest = saTest End Sub The nice thing about this approach is that we can very quickly write data to the spreadsheet, and without looping. However, what if we want to go in the other direction? This statement fails: saTest = rngTest So, can anyone suggest a way to load an array with values from a range--without looping? Thanks. Charley |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
operating over a range in an array | Excel Discussion (Misc queries) | |||
How to fix an array or range | Excel Discussion (Misc queries) | |||
Range as array | Excel Programming | |||
Range as array | Excel Programming | |||
How Can I copy all value of the array into the range? | Excel Programming |