I have an Advanced Filter I call repeatedly using different search criteria , where a database is searched, and the resulting records are extracted to another sheet in the same Workbook. Works fine, and is usually lightning fast. On the order of .1 second for 12 searches.
Seem as soon as I add a record to the existing sheet , the Advanced Filter becomes extremely slow and pins the cpu at full usage. The filter still works, but takes 100 times as long!
Something is not right, and I can't figure it out.
This is the basic code that does all the work
I have
As you can see , the search range is very large but there are only 20,000 populated rows, so adding 1 row to that should not be causing such a slowdown.
Reducing the 999,999 to something smaller speeds up the filter , but its still very slow. It's as if Excel does an optimized search until the range is touched, then forgets how for the remainder of the session. Reloading the sheet fixes it until the next added record.
Any ideas on how to fix this?
Excel 2007
Windows 7 X64, 8 gig ram
Bookmarks