avoid copying format conditions

lazarandreiflorin

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

Some videos you may like

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.

duggie33

Board Regular
Joined
Nov 19, 2018
Messages
77
Office Version
365
Platform
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,095
Office Version
2007
Platform
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
365
Platform
Windows
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,101,747
Messages
5,482,614
Members
407,354
Latest member
Calvince

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top