Hi All,
I am looking to reduce the run time in the below VBA code. The data size its applied is around 5000 rows.
Is there any better way to design these to reduce the processing time.
Please Login or Register to view this content.
Hi All,
I am looking to reduce the run time in the below VBA code. The data size its applied is around 5000 rows.
Is there any better way to design these to reduce the processing time.
Please Login or Register to view this content.
I notice two things:
You are inserting R1C1 formulas into one row at a time. This could be done in one operation instead of a loop.
You are doing a copy & paste with several lines that could be done with an assignment in one line.
Try this. I cannot test this without your file but I would be happy to do so if you attach it.
Please Login or Register to view this content.
Also without seeing the full code, if your not already doing so it is recommended to disable calculation and then turn it back on at the end. Do a search for tips on speeding up vba code
Please Login or Register to view this content.
Thank you for all the suggestions.
@ptmuldoon, I have used your tip on switching off and on calculations.
@6StringJazzer: The Copy and paste I have tried to do all at once, and its fine.
But the problem is the time taken for Calculations once the functions are input in the range. It takes over 15 minutes to complete calculations for around 3500 rows of data.
I am wondering if there is a better way to identify the Minimum Value (with multiple criteria columns) using VBA codes instead of functions.
May be we can avoid comparing whole columns.
I have lrow2 (Last_Row) variable identified from the "Diff_Names" sheet. So how can I use that as part of the Range Reference inside my functions,
e. g. instead of: Diff_Names!C2
something like: Diff_Names(R2C2:R&lrow2&C2) ??? am I going the right way ?
Can you post up a sample file for us to look at?
Thanks for all the help.
The issue was due to comparison of Whole Columns used inside Array Functions.
I have manged to limit them with the use of Last Row variable.
Now its all good.HTML Code:
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks