Copying Formats Quickly with VBA

mmccabe

New Member
Joined
Jun 11, 2003
Messages
43
I have a macro that copys the formats of several adjacent cells (A50:J50) and then pates these formats to the rows above (A2:J49). Functionally, the macro works fine, but the routine is a little slower than I would like it to be--and I need to perform this routine quite frequently. Is there a different method that I can use to speed this up?

For example I know how to copy values in VBA without selecting, copying and pasting to such as...

Range("A2:J49").Value = Range("A50:J50").Value
(much faster than "select", "copy", "paste")

Can I substitute the word "Value" in the command above with something else that will copy ALL formating (colors, borders, fonts, conditionals) to the specified locations? Any ideas?

Your help is greatly appreciated.

Mike
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I think you have to do:

Range("A2:J49").Copy
Range("A50:J50").PasteSpecial Paste:=xlPasteFormats
 
Upvote 0
Thanks for responding. The method in your post is exactly what I am using currently. Are you saying that this may be the only way?
 
Upvote 0

Forum statistics

Threads
1,207,096
Messages
6,076,555
Members
446,213
Latest member
bettigb

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