Speed up VBA code

alecwarner

New Member
Joined
Aug 9, 2013
Messages
17
I've read using the SELECT function slows down VBA.

Is there an alternative method for the following code:

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("SAR").Select
Range("B62:U62").Select
Selection.Copy
Range("B63:U121").Select
ActiveSheet.Paste
Range("B63:P121").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B125:U125").Select
Selection.Copy
Range("B126:U164").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B126:P164").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False


Thanks

Al
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Possibly...

Code:
Sub alecW()
    Application.ScreenUpdating = False
    With Sheets("SAR")
        .Range("B62:U62").Copy .Range("B63")
        .Range("B63:P121").Value = .Range("B63:P121").Value
        .Range("B125:U125").Copy .Range("B126")
        .Range("B126:P164").Value = .Range("B126:P164").Value
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,750
Messages
6,186,805
Members
453,373
Latest member
Ereha

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