![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: New York
Posts: 26
|
hello all
i have 1 array--Name--where Name(x) will give the name of another array--i am looking to populate Name(x)(x) using a for next loop but my problem is that i don't know how to properly syntax the array line-- i need to call For x=0 to 11 Name(x(y))="Whatever" next x any help would be appreciated. Regards, Bill Mahoney The Alcott Group |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
I think there are numerous ways to do this. One way, which builds a 12-element array of 2-element arrays. Sub test() Dim arrName, z ReDim arrName(0 To 11) For z = 0 To 11 arrName(z) = Array("x" & z, "y" & z) Debug.Print arrName(z)(0), arrName(z)(1) Next z End Sub You may also want to set a multidimensional array, which I find is easier to understand. HTH, Jay [ This Message was edited by: Jay Petrulis on 2002-05-13 15:26 ] |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: New York
Posts: 26
|
Thanks for the help.
Regards, Bill |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|