This code is pretty slow any thoughts on how I can improve it?
Please Login or Register to view this content.
This code is pretty slow any thoughts on how I can improve it?
Please Login or Register to view this content.
The first best thing you could do is to not do a full-column search. Restrict the extents via a dynamic range or otherwise.
The next best thing is to sort col A, so you don't need to do a linear search.
Third, why do the search three times?
Please Login or Register to view this content.
Entia non sunt multiplicanda sine necessitate
Instead of looping through the range, you would be better determining the last row of interest and dropping each formula into the entire range. The formula will auto adjust. And, if it's a Structured Table, you probably only need to drop the formulae into the first row anyway.
Regards, 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
Thanks for the help guize I think I got some ideas.
You're welcome. Thanks for the rep.
Had an idea but still have not found an eloquent solution to this. Any thoughts?
Suggest you post a sample workbook.
This is the new codePlease Login or Register to view this content.
Last edited by saechaoc; 07-21-2015 at 01:56 PM. Reason: Error
See post #7
If anyone else has thoughts on improving it would love to hear it but this is as efficient as I could get it.Please Login or Register to view this content.
Down from 12 lines of code to 11 with no loop so looks good to me.
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks