Hello All,
I'm using below code and it's running too slow apprx. 3minutes. Please help me to make it run faster if possible.
Regards,Please Login or Register to view this content.
tt3
Hello All,
I'm using below code and it's running too slow apprx. 3minutes. Please help me to make it run faster if possible.
Regards,Please Login or Register to view this content.
tt3
Last edited by tuongtu3; 01-03-2013 at 01:32 AM. Reason: Solved
Why not just do an Autofilter on column X for zero values, select the visible rows (excluding the header row) and delete them?
Regards ... and a Happy New Year
TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Hi TMS,
I tried as your suggestion but it gave me "Delete entire sheet row?" and does not have an option delete "Shift Cell Up".
I need delete Shift Cells Up base on Range R:AA only.
Regards ...and Happy New Year to you too.
tt3
If your cells are truly blank then see if the code below is any faster
Please Login or Register to view this content.
Last edited by WasWodge; 12-31-2012 at 11:26 PM.
If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved
Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown
Hi WasWodge,
Thank you for the code but it did not work as I expected. It delete the entired row and also delete blank row. To avoid confusion I need a better/faster code for below:
Regards,Please Login or Register to view this content.
tt3
On 1000 lines tested, this code took 6 seconds to run
Please Login or Register to view this content.
Last edited by AB33; 01-01-2013 at 05:47 PM.
Another attempt (try on a copy of your data)
Please Login or Register to view this content.
Last edited by WasWodge; 01-01-2013 at 04:01 PM.
Hello WasWodge & AB33,
Please take a look at the sample ws and I know you guys can make it run in a seconds or less (not 3 minutes like me ).
Regards,
tt3
This should do it
Please Login or Register to view this content.
Thanks,
Mike
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved.
Hi Mike,
The code now reduces from 4 minutes 12 seconds to 1 minutes 42 seconds base on my actual ws.
Regards,
tt3
And another attempt
Please Login or Register to view this content.
Another variation:
Please Login or Register to view this content.
Regards, TMS
I timed Trevor's filter code and seems to be the fastest one. 6 seconds! I do not think any code will beat this one.
Seems to be about 5 seconds on 11,000 rows on my laptop.
Regards, TMS
@WasWodge: this is better
@TMS: the code deletes entire row but I need delete Shift Cells Up range R:AA.
Regards,
tt3
1 minute 16 seconds for 12,000+ rows with this:
Please Login or Register to view this content.
Regards, TMS
Hi TMS, Waswodge, AB33 & Mike:
All codes are good and run faster than I expected. Thank you very much for all your time and help.
Regards,
tt3
You're welcome. Thanks for the rep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks