ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Three Diminsional Array (https://www.excelbanter.com/excel-programming/386439-three-diminsional-array.html)

[email protected]

Three Diminsional Array
 
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.


RB Smissaert

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.



[email protected]

Three Diminsional Array
 
Beautiful. Much faster.

On Mar 29, 9:15 am, "RB Smissaert"
wrote:
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.- Hide quoted text -


- Show quoted text -




RB Smissaert

Three Diminsional Array
 
I said probably, but I knew it would be much faster.

RBS

wrote in message
oups.com...
Beautiful. Much faster.

On Mar 29, 9:15 am, "RB Smissaert"
wrote:
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.- Hide
quoted text -


- Show quoted text -






All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com