PDA

View Full Version : Speed run time of code



SeanJ
03-30-2016, 09:40 AM
Attached workbook has code that takes over 1hr to run through. I know i am missing something. but either I need advice or scrap the whole code.


1. in Asset Correlation tab are Serial number that need to have rest of the information filled in from AMR Asset Report tab
2. there are duplicate information with slightly different dates attached
3. Grab the most current date for certain columns and populate the Asset Correlation tab are Serial number
4. the SN in the Asset Correlation sheet can not be deleted.

I have posted a copy of the code here with no help.

http://www.excelforum.com/showthread.php?t=1132811

Kenneth Hobs
03-30-2016, 09:50 AM
You can probably copy/paste a block of cells in bulk rather than one at a time.

I would suggest adding Application.EnableEvents=False as well. It, ones that you used, and a bit more I put into routines for standard use. http://vbaexpress.com/kb/getarticle.php?kb_id=1035

SeanJ
03-30-2016, 10:04 AM
Thank you Kenneth for the quick response. I will try the Application part first.

I was thinking that bulk pasting too and will try that as well

SeanJ
03-30-2016, 10:52 AM
Kenneth

by just adding Application.EnableEvents=False I am down to 20 mins run time. I will work on block paste next and let you know