LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Junior Member
 
Posts: 21
Default Extracting 3 Arrays from 1 Array

I have a 2-dimensional array [vtData(0, 0)] that is Dimensioned (Dim
vtData As Variant); its Lbound for each dimension is 0 and its UBound
for dimension1 is 4 and its UBound for dimension2 is 2; therefore, 15
elements. (This array is imported into my VBA Code from Bloomberg.)

I do NOT want to paste this array into a worksheet; however, in design
mode only, I am using the following to do exactly that (and it works):

ActiveSheet.Range(Cells(8, 1), Cells(8 + UB1, 3)) = vtData(0, 0),
where UB1 is UBound for dimension1.

OK, I want to create 3 child arrays (one for each column) from the
parent array. (My objective is to connect the individual elements for
each column into one string, using a delimiter, and then paste that
string into a specified cell in my worksheet.) This is my non-working
code:

Dim Col_One As Variant, x As Integer
ReDim Col_One(UB1 + 1)
For x = 0 To UB1
Col_One(x) = vtData(x, 0)
Next x
When stepping-thru my code:
when x = 0, there are no errors;
when x = 1, I get the dreaded 'subscript out of range' error.

Do I need to use WorksheetFunction.Transpose?

JingleRock

 
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
How do you create an Array of Arrays? NickHK Excel Programming 0 December 22nd 06 02:03 AM
How do you create an Array of Arrays? Arvi Laanemets Excel Programming 0 December 21st 06 06:35 PM
array of arrays stored in Name: POSSIBLE? [email protected][_2_] Excel Programming 1 December 21st 04 10:55 PM
Array of Arrays in VBA Peter[_49_] Excel Programming 0 November 9th 04 09:50 PM
Extracting sub arrays from a 2-D VBA array Alan Beban[_2_] Excel Programming 7 August 16th 04 09:50 PM


All times are GMT +1. The time now is 06:15 PM.

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

About Us

"It's about Microsoft Excel"