Hello, could some please view my code as it runs rather slow. Is there a better way to achieve the same results?
Any help would be greatly appreciated,![]()
Please Login or Register to view this content.
Kind regards,
Chris![]()
Hello, could some please view my code as it runs rather slow. Is there a better way to achieve the same results?
Any help would be greatly appreciated,![]()
Please Login or Register to view this content.
Kind regards,
Chris![]()
Last edited by longbow007; 08-13-2009 at 06:55 AM.
Chris, you could remove the AutoFilter in full and then Re-Apply, ie:
As for why your code is slow... well remember that toggling visibility of rows is a Volatile action (partly due to Subtotal function etc...), this means that whenever you adjust visibility of rows by altering the filters all of your calculations that include Volatile functions or refer to cells containing Volatile Functions will recalculate - what are Volatile functions ? see link in sig.![]()
Please Login or Register to view this content.
So if you have lots of Volatiles you may want to think about altering the calculation mode of the Application prior to altering the Auto Filter and then resetting calculation to it's original state upon completion.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I think you want the ShowAllData method
Everyone who confuses correlation and causation ends up dead.
R, presumably the point re: calculation remains however ?
Yep - though resetting once should be a lot faster than going one by one.
Thanks DonkeyOte and romperstomper for all your great help and advice - really appreciated![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks