My code runs so slow! The sheet only has 233 rows and 6 of them are not in the loop.
Any ideas to speed this up is appreciated.
I know, better programming skills would help.
Please Login or Register to view this content.
My code runs so slow! The sheet only has 233 rows and 6 of them are not in the loop.
Any ideas to speed this up is appreciated.
I know, better programming skills would help.
Please Login or Register to view this content.
Last edited by Rick_Stanich; 11-06-2008 at 12:50 PM.
Regards
Rick
Win10, Office 365
Use the shcell object rather than it address as the range argument.
Try all the usual speed-ups.... disable Screenupdating / calculations
If that does not help a explanation and example data set would helpPlease Login or Register to view this content.
See attached xlsx file.
Once opened you should see a set of Buttons with in the top 6 rows, the Button labeled "Report 3" is the one that activates the macro.
In the macro find the sub "CertExpired" which calls "ISOorASexpired" (In the same macro). The macro "ISOorASexpired" is the slow one.
Macro "ISOorASexpired" reads from the cells in column "O" checking dates that are past due from "Now" (Today). If the date is past due the data in the cell for column "M" is changed to a "Y", if not past due it is changed to a "N", if the cell doesn't meet the criteria in the macro ("n/a", "n/d" or "") then it is left as is.
I think I am looping once for each condition I examine instead of checking all the conditions while in a single cell (ShCell).
what's the password?
Oops LOL
2000
I forgot to remove that
disabling calculation is all you need to speed it up.
If you want you could try this code. Double check results are as expected.
Please Login or Register to view this content.
Oh crap thats fast now!
p.s.
I have adopted your clean code
Thank you Andy.
:12 pack:
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks