Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Read Range Data into Array
What is the most efficient way to read a range's data into
a two-dimensional array? I have been in the habit of using loops, but wonder if there aren't better ways, like just declaring a variant variable and assigning it to the range's values, which seems to work (and it's simple). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Read Range Data into Array
The most efficient way by far is to declare a variant variable and assign
the range to it. its usually best to use varArr=oRange.value2 rather than varArr=oRange.value or varArr=oRange because you usually want cells formatted as currency or dates to be coerced to doubles rather than currency or dates. regards Charles ______________________ Decision Models FastExcel Version 2 now available. www.DecisionModels.com/FxlV2WhatsNew.htm "Stratuser" wrote in message ... What is the most efficient way to read a range's data into a two-dimensional array? I have been in the habit of using loops, but wonder if there aren't better ways, like just declaring a variant variable and assigning it to the range's values, which seems to work (and it's simple). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return array of data by date range | Excel Discussion (Misc queries) | |||
How to Read Worksheet Data into VBA Array? | Excel Discussion (Misc queries) | |||
Excel VBA - Read and modify the chart data range | Excel Programming | |||
cboBox to read data from a spreadsheet Range | Excel Programming | |||
cboBox to read data from a spreadsheet Range | Excel Programming |