PDA

View Full Version : Solved: VBA : multidimensional arrays to fill from a worksheet



Dabo
04-28-2009, 09:04 AM
Hello,

I'm new to VBA but I'm training hard to progress.
I'm currently finding it very hard to solve this problem and I need your insights:

I have an excel worksheet of 3000 lines * 10 columns
I need to create on VBA an array containing the informations of this worksheet.
For example the columns of my excel worksheet are:
ProductColorWeightSizeValue
Product A Color A Weight A Size A Value B
Product B Color A Weight C Size D Value A

Each line would be coded in my array as
(A A A A B)
(B A C D A)

How can I code the filling of my array ?
I have no Idea about it

Bob Phillips
04-28-2009, 09:59 AM
Dim ary As Variant

ary = Range("A3000:J3000")

Dabo
04-28-2009, 10:09 AM
Thank you so much !

mdmackillop
04-28-2009, 12:14 PM
Hi Dabo,
Welcome to VBAX. If this is solved, can you mark it so using the Thread Tools dropdown
Regards
MD

mdmackillop
04-28-2009, 12:16 PM
Dim ary As Variant

ary = Range("A3000:J3000")


Did you mean

ary = Range("A1:J3000")

Dabo
04-29-2009, 04:10 AM
Hi Dabo,
Welcome to VBAX. If this is solved, can you mark it so using the Thread Tools dropdown
Regards
MD
Hello,

Done !