Copy/Paste Multiple Workbooks Speedup

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
656
Hi - I'm using the code below to copy and paste from one workbook to another, but it takes forever. Is there a better way to do it? Thanks!

Sub Macro1()


Application.ScreenUpdating = False


Set ws1 = ThisWorkbook.Sheets("Dump")
Set ws2 = Workbooks("DATA").Sheets("Info")


With ws1
.Range("F34:G34").Value = ws2.Range("AG78:AH78").Value
.Range("E36").Value = ws2.Range("AG95").Value
.Range("G36").Value = ws2.Range("AH95").Value
.Range("F124").Value = ws2.Range("AC111").Value
.Range("G124").Value = ws2.Range("AC106").Value


.Range("E124") = .Range("F124") + .Range("G124")
.Range("E124").Value = .Range("E124").Value
.Range("F124:H124").Clear
End With


End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi there

I have just tried this out and its almost instant. I suspect you have got formulas in the workbook you are copying into and excel is recalculating each time? If so, try putting
Code:
Application.Calculation = xlCalculationManual
at the top and
Code:
Application.Calculation = xlCalculationAutomatic
at the end. (I would also add
Application.ScreenUpdating = True
as well).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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