Populating a multi dimensional array
You will need something along these lines:
dim r as long
dim c as long
dim arr(1 to 122, 1 to 3) as string
for r = 1 to 122
for c = 1 to 2
arr(r, c) = cells(r, c).text
next c
arr(r, 3) = "constant"
next r
RBS
"Wendy" wrote in message
...
Hi,
I can't quite piece together the answer I need from the existing threads;
how do I loop through a worksheet, picking up data from cells as I go a
long?
and add them to my array. I have the basic code I need to cycle through
the
worksheet, but can't work out how to keep adding data to the array (I can
do
it on the first instance).
The array will end up being a 3 column x 122 row array; the third column
data is static i.e. it will always have a fixed value, but the first and
second items are scraped from a worksheet. The values are text not
numbers.
Many thanks for your responses.
|