M
Mike
This is what i do for a 1 dimensional array but i wondering how
to do a 2 dimensional. Then have Range("M" & x) = the first dimension
and have Range("M" & x).offset(0,1) = the second dimension. Just starting to
understand arrays.
Dim arrEmployee() As Variant
Dim strEmployee As Variant
Dim rng As Range
Dim x As Long
Set rng = Range(Cells(2, 3), Cells(Rows.Count, 3).End(xlUp))
x = 0
ReDim arrEmployee(1 To rng.Rows.Count)
For Each cell In rng
x = x + 1
arrEmployee(x) = cell.Value
Next cell
x = 2
For Each strEmployee In arrEmployee
Range("M" & x) = strEmployee
x = x + 1
Next
to do a 2 dimensional. Then have Range("M" & x) = the first dimension
and have Range("M" & x).offset(0,1) = the second dimension. Just starting to
understand arrays.
Dim arrEmployee() As Variant
Dim strEmployee As Variant
Dim rng As Range
Dim x As Long
Set rng = Range(Cells(2, 3), Cells(Rows.Count, 3).End(xlUp))
x = 0
ReDim arrEmployee(1 To rng.Rows.Count)
For Each cell In rng
x = x + 1
arrEmployee(x) = cell.Value
Next cell
x = 2
For Each strEmployee In arrEmployee
Range("M" & x) = strEmployee
x = x + 1
Next