Multi Dimensional Array

Joined
Jan 25, 2008
Messages
1
Reaction score
0
Hi
I am trying to write a macro that will read in information from three columns from Sheet1 example data below:
column
A..........B........C
1e........p.........1
1env.....p.........1
2d........30.......2
3deNV...60.......4
401e.....30.......1
301.......0........1


etc.. I have 277 rows all of which are unique values, the array has to be dynamic so I can add or subtract row as I please.(the dots are just to show the columns)

These values are stored in rows. What I need is to read these values in from a button on a different sheet (Sheet2). I would like to read them in into an Array. I can do it for just two coloumns but can not do it for the three columns.
I am trying to do it like this:

For x = 1 To firstRow
test1 = Worksheets("Sheet1").Cells(counter5, 1).Value
test2 = Worksheets("Sheet1").Cells(counter5, 2).Value
test3 = Worksheets("Sheet1").Cells(counter5, 3).Value
door(counter5, 1) = test1
door(counter5, 2) = test2
door(counter5, 3) = test3
counter5 = counter5 + 1
Next x

But this is just giving me blanks in my array.
I am defiantely going wrong somewhere, or is what I am trying to do even possible?
Any Help is appreciated!
 
Last edited:

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