Create a new matrix in excel macro

Closed
Karen - 21 Dec 2010 à 09:27
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 9 Feb 2011 à 16:38
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) <--------------------???



Related:

1 response

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