loop to add data in array

G

Guest

There is no support for that and since there isn't I would wonder why you
would want to do that

you can do an array of arrays

Sub AABB()
Dim wArray1, wArray
Dim i as long, j as long, k as long
ReDim wArray1(1 To 100)
ReDim wArray(1 To 100)
k = 0
For i = 1 To 100 Step 10
For j = 1 To 10
k = k + 1
wArray(k) = Application.Transpose(Cells(i, j).Resize(10, 1))
wArray1(k) = Cells(i, j).Resize(10, 1).Address
Debug.Print k, Cells(i, j).Resize(10, 1).Address
Next
Next

MsgBox wArray(3)(5)
End Sub
 
A

Alan Beban

PST said:
Hello

That is to say a table of 100 rows and 10 colums
A1:J100 With a loop I would like that:

line A1:A10 becomes W_1 array
the line b1:b10 becomes W_2 array
the line c1:c10 becomes W_3 array

etc for all the lines, with the corresponding data of each line


Thank you

I'm afraid I can't see what "etc" means. Is there a W_11 array?

Alan Beban
 
P

PST

Hello

That is to say a table of 100 rows and 10 colums
A1:J100 With a loop I would like that:

line A1:A10 becomes W_1 array
the line b1:b10 becomes W_2 array
the line c1:c10 becomes W_3 array

etc for all the lines, with the corresponding data of each line


Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top