Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default transferring matrix to range


A worksheet contains 10000 rows containing each 10 groups of (9 column
of values PLUS 1 empty column).
I want to define a range for each group and load them into an (integer
matrix. After performing some calculations and changing some values o
the a matrix I would like to write the array back into the range.

Something like:
*********
dim rngData as object
dim arrValues(10000,9) as integer

with worksheets("Sheet-1")
set rngdata = range(.cells(1,1),.cells(10000,9))
arrValues = rngData.getvalues() 'a call like that but I don
know the right one
for i=1 to 10000
for j = 1 to 9
arrValues(i,j) = arrvalues(i,j) *rnd() '/// just SOM
calculation
next j
next i
rngdata.values = arrvalues ' a call like that but I don t know th
right one
end with
*********

How can I read the values into the matrix and how can I store th
values onto the range EFFICIENTLY

--
JackRn
-----------------------------------------------------------------------
JackRnl's Profile: http://www.excelforum.com/member.php...fo&userid=3717
View this thread: http://www.excelforum.com/showthread.php?threadid=56888

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default transferring matrix to range


You must use a VARIANT to a block of data from an excel range.
(you can write any TYPED array to a range)

There WERE limitations to the size of the array.
Excel XP SP? and Excel 2003 dont have that limit any more.

Dim vData as Variant
vData =Range("a1:f10000").Value



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


JackRnl wrote in



A worksheet contains 10000 rows containing each 10 groups of (9
columns of values PLUS 1 empty column).
I want to define a range for each group and load them into an
(integer) matrix. After performing some calculations and changing
some values of the a matrix I would like to write the array back into
the range.

Something like:
*********
dim rngData as object
dim arrValues(10000,9) as integer

with worksheets("Sheet-1")
set rngdata = range(.cells(1,1),.cells(10000,9))
arrValues = rngData.getvalues() 'a call like that but I don t
know the right one
for i=1 to 10000
for j = 1 to 9
arrValues(i,j) = arrvalues(i,j) *rnd() '/// just SOME
calculation
next j
next i
rngdata.values = arrvalues ' a call like that but I don t know the
right one
end with
*********

How can I read the values into the matrix and how can I store the
values onto the range EFFICIENTLY?

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
Summing values within a matrix who are both in a column where theheaders are within a certain numerical range and in a row where the rowheaders are specified. Andy Excel Worksheet Functions 4 November 9th 09 10:53 PM
Getting a position XY (range) on a matrix Jepane Excel Discussion (Misc queries) 0 July 16th 07 04:24 PM
Range Matrix GarToms Excel Worksheet Functions 2 October 6th 06 07:48 AM
transferring array to range JackRnl Excel Programming 4 August 8th 06 01:13 AM
Transferring part of a multi-dimensional array to a range in VBA Bob J.[_3_] Excel Programming 1 July 27th 05 03:38 PM


All times are GMT +1. The time now is 10:44 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"