Re: Reading from a excel *** to an array
- From: Alan Beban <unavailable@xxxxxx>
- Date: Wed, 18 May 2005 09:27:48 -0700
It isn't at all clear what your process is, but on the narrow question of transferring the contents of a column to a column of an array, if the functions in the freely downloadable file at http:/home.pacbell.net/beban are available to your workbook, the following will transfer the contents of the range to the 4th "column" of the array FinalOutput if it is an array of 26 rows and at least n columns:
n=4 'Simulation number
Set rng = Sheets("sheet2").Range("b60.b85")
ReplaceSubArray FinalOutput, rng, 1, nThis can, of course, also be done directly by
For i = 1 to 26 FinalOutput(i,n) = rng(i) Next
Alan Beban
Pradip Jain wrote:
i am running simulation analysis. Each simulation returns results comes in cells b60 to b85 of sheet2. next simulation will also return its output in the same range.
suppose i am running 10 simulations. each simulation output is basically a 10 rows by 1 column range in sheet2. this results need to go into an array called FinalOutput which would be a 26 by 10 array. I want to read the entire range "b60 to b85" in sheet2 into the FinalOutput array. Basically depending on the simulation number, an entire column of FinalOutput array gets created. so simulation 1 output gets transferred to column 1 of final output array and so on. is there some way i can transfer an entire range into a column of an array.
thanks pradip
.
- Follow-Ups:
- Re: Reading from a excel *** to an array
- From: Alan Beban
- Re: Reading from a excel *** to an array
- References:
- Reading from a excel *** to an array
- From: Pradip Jain
- Reading from a excel *** to an array
- Prev by Date: Re: Using VB to to create named ranges
- Next by Date: Re: Query Macro
- Previous by thread: Re: Reading from a excel *** to an array
- Next by thread: Re: Reading from a excel *** to an array
- Index(es):
Loading