I have an Excel report. This report has many, many different types on it. (A, B, C, D, etc.). I'd only like a few of these types - Let's say A and B. The actuality is much larger, otherwise I'd use an autofilter. I'm trying to move A and B from the first workbook to the second workbook, and leave the rest alone. Here's what I have so far:
Sub ConditionalMoving ()
Workbooks.Open Filename:=MSCReportPath
Set MSCReport = ActiveWorkbook
Workbooks.Open Filename:=CABReportPath
Set CABReport = ActiveWorkbook
Set MSTab = MSCReport.Sheets(1)
LastRowMSC = MSTab.Range("A" & Rows.Count).End(xlUp).Row
i = 1
j = 1
For i = i To i = WorksheetFunction.CountA(MSTab.Range("A1:A" & LastRowMSC))
If IsNumeric(WorksheetFunction.Match(MSTab.Range("E" & i), Range("MSCFundList"), 0)) Then
Set RngMSC = MSTab.Range("A" & i & ":AZ" & i
CabReport.Sheets("MS").Range("B" & j & ":BA" & j).Value = RngMSC.Value
j = j + 1
End If
Next I
End sub
And it runs no problem. At the end, I have a large block highlighted on my destination sheet - with no text at all. The size of the highlighted block is roughly what I'd expect to come through.
Am I making any obvious mistakes? I've seen some things with arrays floating around, is there a better way to do this with an array? How would you find the needed parts and move them over?
No error messages are generated.