Looking to Make Macro More Efficient

WindsorKnot

Board Regular
Joined
Jan 4, 2009
Messages
160
Hi all,

I copied a snipet of my code below. I need to simply determine how to make this process a little faster, as I have to do this for 30 subdivisions. More specifically, is there a more effiecent means to doing the pastespecial arguement, as I think this may speed things up a bit

Thanks

Code:
Sub RateExhibits_Update()
 
Application.ScreenUpdating = False
 
' Update Total Exhibit
    Sheets("Rate Summary-Updated").Range("D4:G76") _
    .Copy Sheets("Total").Range("D20").Select
    Sheets("Total").Range("D20").Select
    Selection.PasteSpecial Paste:=xlPasteValues, _
    Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
 
Application.CutCopyMode = False
End Sub
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
This is a much easier way. Don't use the copy command at all. Simple code the values. Something like this:

Sheets("Total").Range("D20:G92").values = Sheets("Rate Summary-Updated").Range("D4:G76").values

In this example you need to make sure that the ranges are the same size.

JM
 
Upvote 0
Jmattus,

For some reason I can't get your formula to work

This is how I have altered it slightly

Code:
Sheets("Total").Range("D4:G76").Values = _ 
Sheets("Rate Summary-Updated").Range("BV4:BY76").Values

I get the runtime error: Object doesn't support this method or property

Can you please tell me where I am going wrong
 
Upvote 0
Jmattus,

For some reason I can't get your formula to work

This is how I have altered it slightly

Code:
Sheets("Total").Range("D4:G76").Values = _ 
Sheets("Rate Summary-Updated").Range("BV4:BY76").Values
I get the runtime error: Object doesn't support this method or property

Can you please tell me where I am going wrong

Its always range().VALUE - without the -s. So your code should be:
Code:
Sheets("Total").Range("D4:G76").Value = _ 
Sheets("Rate Summary-Updated").Range("BV4:BY76").Value
 
Upvote 0

Forum statistics

Threads
1,215,437
Messages
6,124,871
Members
449,192
Latest member
MoonDancer

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