populate array
A couple of ways for you
ary = Array(Range("A1").Value, Range("A2").Value)
For Each cell In Selection
ReDim Preserve ary(i)
ary(i) = cell.Value
i = i + 1
Next cell
both of which produec a single dimension, base 0, array,
OR
ary = Selection
which creates a 2D, base 1, array
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Marina Limeira" wrote in message
...
How populate array by sheet data ?
example:
a1 = "mary"
a2 = "john"
in VBA
var AR = array( populate from A1 and A2 )
thanks
Marina
|