Create a new matrix in excel macro

Closed
Karen - Dec 21, 2010 at 09:27 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 9, 2011 at 04:38 PM
Hello,

I would like to create a new matrix under some conditions from old dataset.
Basically, I want to choose rows from the old data as long as the conditions are met.
(And, I do not know how big this new matrix is going to be)


Sub match()
Dim a(300, 16)

Sheets("sheet1").Select
LL = ActiveSheet.UsedRange.Rows.Count + 5
For i = 1 To LL
a(i, 1) = Cells(i + 6, 19)
a(i, 2) = Cells(i + 6, 20)
a(i, 3) = Cells(i + 6, 22)
a(i, 4) = Cells(i + 6, 13)
Next i

If a(i, 4) = 1 and a(i,1)="January" Then aa(c,1) <--------------------???



1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 9, 2011 at 04:38 PM
Could you explain more in detail
0