Need Help to Speed up 2007/2010 Excel Macros

Roncondor

Board Regular
Joined
Jun 3, 2011
Messages
83
I have some Excel 2003 Macros that run 5 or 6 times slower in Excel 2007 / 2010. (Not sure how Microsoft accomplished such a wonderful feat!)

That speed is just not acceptable.

PLEASE Does anyone have any pointers for me on how to speed it up?

THANKS!

-----------------------------
Sub Test()

Dim I As Integer

With Application
.Iteration = False
.MaxChange = 0.001
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
ActiveWorkbook.PrecisionAsDisplayed = False

Calculate

For I = 1 To 500

Application.StatusBar = I

Range("c_assetloop").Value = I

Range("calc_mtginfo").Calculate

Range("newcell).value = Range("oldcell").value ' single cell

Range("Calc_Fillmtgdata").Calculate

Application.Goto reference:="Calc_MtgCfSheet"

ActiveSheet.Calculate

'=============================================
'THIS IS THE LINE THAT CAUSES THE SLOW DOWN
' CFS_TO and CFS_from are 10 x 120 arrays.
' CFS_TO is not referenced by any other cells
'=============================================
Range("cfs_to").Value = Range("cfs_from").Value
'=============================================

Next I

Application.StatusBar = False

Application.Calculation = xlAutomatic

Calculate

End Sub
 
Last edited:
Putting the WHY aside....And concentrating on resolution...
Can't really say without understanding the purpose of the code...

Can you post:

The contents of the "Refers To" box for ALL the named rangeS?
c_assetloop
calc_mtginfo
newcell
oldcell
Calc_Fillmtgdata
Calc_MtgCfSheet
CFS_TO
CFRS_from

The names of all the related sheets (and which sheets are related to which named ranges).

And a sample set of data for each relavant sheet.



Or perhaps you would like to email your book to me?
Replacing confidential data, and providing a dummy dataset?
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I think it would be more helpful if you posted what's in your named ranges ( formulas, etc.)

For instance, if you have formulas that reference entire columns in 2003, depending on the formula, it will calculate a lot faster than the same formulas in 2007 and 2010 (because there are a lot less rows in 2003).
 
Upvote 0
I think you probably just hit the nail on the head...

I think it would be more helpful if you posted what's in your named ranges ( formulas, etc.)

For instance, if you have formulas that reference entire columns in 2003, depending on the formula, it will calculate a lot faster than the same formulas in 2007 and 2010 (because there are a lot less rows in 2003).
 
Upvote 0
Solutions:
Excel 2003: Options -> View -> "uncheck" show page break
Excel 2007: top left office button -> Excel Options -> Advance -> under section Display options for this worksheet -> "uncheck" show page breaks
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top