Copy Formatting Question

hallingh

Well-known Member
Joined
Sep 11, 2010
Messages
769
I have a generate report macro that takes data from a number of sheets and puts together the main report sheet. I want the macro to copy over the formatting from these sheets as well, but NOT the conditional formatting. Is there a way to copy all formatting except conditional formatting?

Any help is greatly appreciated. Thanks!

Hank
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Generally speaking, when you copy-paste the formats, that includes the conditional formatting (CF) as well. I would recommend you paste the formats including any CF. Then just delete the the CF from the destination cells.

Example:
Code:
Sheets("Sheet1").Range("A1:B10").Copy Destination:=Sheets("Report").Range("D1:E10")
Sheets("Report").Range("D1:E10").FormatConditions.Delete
 
Last edited:
Upvote 0
Thanks for the response. The reason I don't want to copy the conditional formatting to the destination cells is I already have conditional formatting in place in the destination cells that I want to keep.

Any clue of another way I could get around this issue?

Thanks a lot for the response.

Hank
 
Upvote 0
Copy the Values, Number Format, and Font etc. in multiple steps.
Or
Copy the formats with the CF and then change the CFs after the copy-paste.

I don't know of a one-step method to copy-paste Formats excluding CF.
 
Upvote 0
A bit clunky, but how about getting the macro to re-write the original CF into the destination cells, after it's been over-written by the Copy / Paste
 
Upvote 0
Thanks for the help. I wasn't certain if it was possible to exclude CF. I will do it in multiple steps.

Thanks!

Hank
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,558
Members
452,928
Latest member
101blockchains

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