View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
andym andym is offline
external usenet poster
 
Posts: 22
Default Multi Dimensional Array

Thanks Ken and Nick..

while you posting your reply I took your initial thoughts and created
the following:

Sub arraytest2()

Dim Arr(0 To 299) As String
Dim N As Integer, M As Integer
Dim i As Integer, x As Integer

i = 0

Range("A33").Activate

For x = 1 To 100
If Left(ActiveCell.Value, 1) = 2 Then

For M = 0 To 1
Arr(i) = ActiveCell.Value
Arr(i + 1) = ActiveCell.Offset(0, 2).Value
Arr(i + 2) = ActiveCell.Offset(0, 3).Value
i = i + 3
ActiveCell.Offset(1, 0).Activate
Next M

End If
ActiveCell.Offset(1, 0).Activate
Next x

For N = 0 To 299
Debug.Print Arr(M)
Next N

End Sub

This works fine, but is obviously restrictive. I will now use your
example and modify it. I appreciate everybody's help in this.

Regards,

andym


Ken Johnson wrote:

Hi Andy,

forgot to mention the criterion for inclusion in the array was column A
value = 10

Ken Johnson