Autofilter in a macro


M

MarkN

Hello,

I have a workbook that uses several macros to filter data from the raw data
on sheet1 and then create tables on subsequent sheets. I did all of this by
using the macro recorder. The results I get are fine but the macros run quite
slowly. Is there a more efficient syntax to produce the results quicker,
currently the code looks like:

Sheets("master data list").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AC$10000").AutoFilter Field:=3, Criteria1:="AVV"
ActiveSheet.Range("$A$1:$AC$10000").AutoFilter Field:=23,
Criteria1:=">=" & Format(CDate(critCorp), "mm/dd/yyyy"), Operator:=xlAnd,
Criteria2:="<=" & Format(CDate(critCorp), "mm/dd/yyyy")
 
Ad

Advertisements

B

Barb Reinhardt

You may want to look at your criteria for column 23. Is it really >= and <=
the same date?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top