• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to copy Conditional Formatting

clramjit

New Member
Hi,

I have a workbook I'm working on where I'm having some issues with copying Conditional formatting. On the sample sent, there are 3 sheets, Jan, Feb and Blank. There is a Button in Jan and Feb sheet to insert rows from the Blank sheet. You can view the code for that. In the Blank sheet, D2:E2 contains Data and Conditional Formatting. When I go through the process in Sheets Jan and Feb to insert a pre-defined selection, the data in D2:E2 is copying but not the CF. Is there any code that can be added to my code to do that. Now the Pre-defined rows can be inserted with matching columns in sheet Jan & Feb, just the Row numbers will be changed as more is inserted. I will need to repeat that process in other sheet months, which I left out for simplicity. So as bullet points, this is what I would like to accomplish:

  • Using the Button in Sheets, insert pre-defined rows from Blank sheet, as is stipulated.
  • When the rows are inserted in destination sheet, the CF from Source sheet (cell D2:E2 - dropdown list) must also be transferred.
  • Have destination sheet be non-specified or "open" as insertions will be on any given sheet and many more.

Can what I ask be done while incorporating the code into my existing code? May be a macro for Format Painter or something of that sort.

Note: I am not an expert in codes, I arrive at existing codes from forums like this, so thank you very much for any input.

CL.
 

Attachments

  • 2019 - Draft plan.xlsm
    64.2 KB · Views: 6
Back
Top