dispelthemyth
Well-known Member
- Joined
- Mar 16, 2006
- Messages
- 664
- Office Version
- 365
- Platform
- Windows
I have a loop that copy / paste and recalculates a number of times until the variance is under materiality, these might happen 50+ times.
The code I have been using is below but the copy / paste part tame about 1.2 - 1.3 seconds.
I have the below set before I run the code
Copy paste code
Application.calculate takes around 0.3 - 0.4 seconds, so each iteration takes ~ 1.6 seconds
The copy / paste range is 35 rows by 86 columns, roughly half of the cells have a formula and half are blank
The data in the copy range is a mixture of formulas with numbers or blanks (no formula or number)
The code I have been using is below but the copy / paste part tame about 1.2 - 1.3 seconds.
I have the below set before I run the code
VBA Code:
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Copy paste code
VBA Code:
Set RngCopy = Names("Master_Copy").RefersToRange
Set RngPaste = Names("Master_Paste").RefersToRange
RngPaste.Value2 = RngCopy.Value2
Applcation.calculate
Application.calculate takes around 0.3 - 0.4 seconds, so each iteration takes ~ 1.6 seconds
The copy / paste range is 35 rows by 86 columns, roughly half of the cells have a formula and half are blank
The data in the copy range is a mixture of formulas with numbers or blanks (no formula or number)
Last edited: