View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Three Diminsional Array

Fastest way is probably to put the data in a 2-D array first and then assign
that 2-D array to a range in one go.
So loop through your 3-D array, values to 2-D array and then for example
Range(Cells(1), Cells(20, 20)) = Array.

RBS


wrote in message
ups.com...
I am using a three dimensional array and trying to extract data from
the array into excel. Currently, I am using a For/Next Statement to
populate each excel cell seperately from the array. I am hoping to
find a more efficient way of accomplishing this.

For example, if the array has 600 rows and 10 columns and the third
diminsion is 20.

I am trying to copy all the rows (1-600) and all the columns (1-10)
from the third diminsion equal to 1 onto the excel worksheet. And
then repeat the process for the next third diminsion.

I tried selecting Array(1 to 600, 1 to 10,1), but that did not work.

I am a bit of a newbie here, so any help would be appreciated.