hi all...
what i want to do is to read all the data in columns A, B & C and store them in an array.
the amount of data in columns will increase in time.
column A will be a integer
column B & C will be text
please help
hi all...
what i want to do is to read all the data in columns A, B & C and store them in an array.
the amount of data in columns will increase in time.
column A will be a integer
column B & C will be text
please help
Do you need to [Read] the values in the range?
Dim a
a = Range("a1:c100").Value
will give you a(1 To 100, 1 To 3) variant type 2D array...
else
Sub Sample() Dim a(), i As Long, ii As Long, rng As Range Set rng = Range("a1:c100") Redim a(1 To rng.Rows.Count, 1 To rng.Columns.Count) For i = 1 To rng.Columns.Count For ii = 1 To rng.Rows.Count a(ii, i) = rng.Cells(ii,i).Value Next Next Range("f1").Resize(UBound(a,1),UBound(a,2)) = a Erase a End Sub
Last edited by jindon; 07-04-2006 at 08:46 PM.