ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filling an Array (https://www.excelbanter.com/excel-programming/428661-filling-array.html)

kirkm[_8_]

Filling an Array
 

Dim a(4,2)

Is there any way to implement

a(0 to 4,0) = Split ("22,33,44,55,66",",")
a(0 to 4,1) = Split etc etc.

Or must each array element be assigned individually?

Thanks - Kirk

Lori

Filling an Array
 
a = array(split("1 2 3"),split("1 2 3 4")): ?a(1)(3)

maybe? (returns 4 from the immediate window)

"kirkm" wrote:


Dim a(4,2)

Is there any way to implement

a(0 to 4,0) = Split ("22,33,44,55,66",",")
a(0 to 4,1) = Split etc etc.

Or must each array element be assigned individually?

Thanks - Kirk


kirkm[_8_]

Filling an Array
 
On Mon, 18 May 2009 20:59:02 -0700, Lori
wrote:

a = array(split("1 2 3"),split("1 2 3 4")): ?a(1)(3)

maybe? (returns 4 from the immediate window)


Thanks Lori, I'd forgotten about Array.Opens up
some nice possibilites.

Cheers - Kirk


All times are GMT +1. The time now is 11:48 AM.

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