Create One-Dimensional Array from Two-Dimensional Array
Dim varr1()
num = (ubound(varr,1) - lbound(varr,1) + 1) * _
(ubound(varr,2) - lbound(varr,2))
redim varr1(1 to num)
for i = lbound(varr,1) to ubound(varr,1)
for j = lbound(varr,2) to ubound(varr,2) - 1
k = k + 1
varr1(k) = varr(i,j)
next
Next
--
Regards,
Tom Ogilvy
"Stratuser" wrote in message
...
I need to create a one-dimensional array from a two-dimensional array. My
two-dimensional array has R * C (rows times columns) elements. I want my
one-dimensional array to have all the data from the two-dimensional array,
except for the last column, so it needs to have R * (C-1) elements.
Any ideas about how to construct this one-dimensional array?
|