teeitup16
10-22-2012, 04:13 PM
I’ve created a loop macro which results in the attached summary sheet for each value tested. Prior to the next loop the code currently uses a Data Filter within excel to select only the required lines. The filtered lines are copied and moved to a data summary tab and the Data Filter is released for the next value tested within the loop. The code works but the time associated with the each filter has cause the macro to take 10 or 15 minutes to complete.
I believe I should be using a filter array to select and copy the data instead of the Data Filter. I’ve researched Array filters but don’t seem to fully fit what I’m trying to solve.
Thank you so much for your any assistance you can provide.
Doug
Sheets("Trade Limiter").Select
Columns("A:Q").Select
Selection.AutoFilter
ActiveSheet.Range("A:Q").AutoFilter Field:=12, Criteria1:="<>"
Range("Q1").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
` Sheets("Trade Data").Select
ActiveSheet.Paste
I believe I should be using a filter array to select and copy the data instead of the Data Filter. I’ve researched Array filters but don’t seem to fully fit what I’m trying to solve.
Thank you so much for your any assistance you can provide.
Doug
Sheets("Trade Limiter").Select
Columns("A:Q").Select
Selection.AutoFilter
ActiveSheet.Range("A:Q").AutoFilter Field:=12, Criteria1:="<>"
Range("Q1").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
` Sheets("Trade Data").Select
ActiveSheet.Paste