Forum Discussion
waygar
Feb 15, 2023Brass Contributor
Speeding Up VBA execution
Hi, The following code searches a large database for cells with a certain fill color and then removes the underlying conditional formatting. The runtime is quite slow. Can this code be made more eff...
waygar
Mar 05, 2023Brass Contributor
Thanks Hans,
That is unbelievable. A test data set took 80 seconds to complete with my code whereas your routine did it in less than a second.
Unbelievable.
Cheers,
That is unbelievable. A test data set took 80 seconds to complete with my code whereas your routine did it in less than a second.
Unbelievable.
Cheers,
HansVogelaar
Mar 05, 2023MVP
My version reads the data into an array, traverses the array and then writes the array back to the sheet in one go.
Array manipulations are much faster than sheet manipulations.
- waygarMar 05, 2023Brass ContributorHi Hans,
Do you lose cell formatting in this approach when moving data in and out of arrays?- HansVogelaarMar 06, 2023MVP
- waygarMar 23, 2023Brass ContributorHi Hans,
How do I create a Userform that contains, among other things, a combo box that contains a list of dates with one date to select. The default date that is initially shown must be today's date and the dates that can be selected range from say 14 days before the default of today's date to 14 days ahead of today's date. Of course today's date will change eveyday. It would be preferable not to have this list in any worksheet if possible.