avoid copying format conditions

lazarandreiflorin

New Member
Joined
Dec 16, 2018
Messages
26
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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

duggie33

Board Regular
Joined
Nov 19, 2018
Messages
77
Office Version
  1. 365
Platform
  1. Windows
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
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,619
Office Version
  1. 2007
Platform
  1. Windows
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.
 

duggie33

Board Regular
Joined
Nov 19, 2018
Messages
77
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,381
Messages
5,635,924
Members
416,887
Latest member
SheriE

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
Top