ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Concatenate / Select Subset of Arrays (https://www.excelbanter.com/excel-programming/385480-concatenate-select-subset-arrays.html)

Andrew Hall NZ

Concatenate / Select Subset of Arrays
 
My specific question relates to 2D arrays:

1. How to add say a new 10 column row to an existing array with x rows
already in it

2. How to create a new array from row 2 col 2 to row 6 col 8 from am
existing 10 x 12 array (pretty easy with a Range object).

Obviously I can do it by looping through the arrays and assigning values one
at a time but is there a better alternative.

Andrew

merjet

Concatenate / Select Subset of Arrays
 
You can't do #1 in VBA. See "ReDim" in the VB Editor's Help.

Re #2 the one-at-a-time method is the only way I know (w/o using the
Range method). VB is not like APL.

Hth,
Merjet



merjet

Concatenate / Select Subset of Arrays
 
About #1 I expect Transpose -- ReDim Preserve -- Transpose will work
for a 2-dimensional array.

Merjet




All times are GMT +1. The time now is 04:11 PM.

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