Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return array of data by date range Ken King Excel Discussion (Misc queries) 1 March 3rd 09 01:13 AM
How to Read Worksheet Data into VBA Array? Peter Bernadyne Excel Discussion (Misc queries) 1 July 12th 06 05:19 PM
Excel VBA - Read and modify the chart data range rcatarino Excel Programming 0 April 6th 04 01:19 AM
cboBox to read data from a spreadsheet Range igor dudkin Excel Programming 0 July 18th 03 04:49 AM
cboBox to read data from a spreadsheet Range Tom Ogilvy Excel Programming 0 July 17th 03 09:14 PM


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"