Add dimesion to Array already populated
Sorry Allan. I have 1D array with rows populated. I have done so doing the
following:
BigArray = Split(StringList, " ")
I was trying to avoid looping (for no real reason). I wasn't sure if could
still populate all the rows in the first dimension (like i did above) of the
Array if had in fact dimensioned it as 2D array. so I was wondering can you
add a dimension to the array after I have populated the rows in the first
dimension or can dim as 2D and still use the syntax above to populate 1D?
"Alan Beban" wrote:
ExcelMonkey wrote:
Is it possible to create a second dimension to an array that has already had
its first dimension filled with data:
BigArray = Split(StringList, " ")
I want to redimension BigArray so that it now has a second dimension. Or do
I dimension with 2D upfront and then add the outcome to the split to the
first dimension. Can you do that? I have been trying to avoid looping.
Thanks
EM
You're using some terms strangely here. What is your concept of "filling
the first dimension" of a 2-D array? You don't fill dimensions, you fill
"rows" and "columns". Every single element of a 2-D array has two
dimensions--its "row" dimension and its "column" dimension. That's why
you have to access it with 2 index numbers.
It is certainly possible to convert a 1-D array to 2-D, and although the
2-D array may have only one row of data, it does not have a "first
dimension filled with data".
So how about a clearer illustration of what you are trying to do. E.g.,
are you simply trying to convert a 1-D array to 2-D?
Alan Beban
|