avoid copying format conditions

lazarandreiflorin

New Member
Joined
Dec 16, 2018
Messages
34
Hello,

I have a range ("A1:F20") in which everyday someone copies some text and values. The range has a dark green font and a light green fill with no borders but every time I copy the values or text this changes. I know I can use the paste values option but I am not the only one using it. I know it can be formatted via code but I don't know the code or how to make it overrule the conditional formatting rules that copies along with the text or how to make the code work without any button/trigger. Hope I made myself clear. Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Does that data being copied always come from the same location? If yes, you could record a macro of yourself doing a copy and pastespecial/values. A shortcut could be added when you record the macro or a button could be added to run the macro. The code recorded will be pretty sloppy but it should run fast regardless.

I suggest watching a tutorial video on recording a macro first.

Hope that helps,

Doug
 
Upvote 0
If you create a sheet called "Temp" and on the "Temp" sheet, you paste your data.
On your sheet in cell A1 you put the formula =Temp!A1 and so on for each of the cells in your sheet up to F20 =Temp!F20


You can also protect your sheet in this way the formulas will not be modified and they will keep the conditional format.
 
Upvote 0
I think DanteAmor's idea of a "temp" sheet to paste the data will work perfect for your situation. It would not matter what formatting is of the data on the "temp" sheet. Your range that has a dark green font and a light green fill with no borders would reference the "temp" sheet and its formatting would not change when new data is pasted on the "temp" sheet.
 
Upvote 0

Forum statistics

Threads
1,224,894
Messages
6,181,618
Members
453,057
Latest member
LE102024

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