+ Reply to Thread
Results 1 to 4 of 4

Copy and paste cells with Conditional Formatting

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Copy and paste cells with Conditional Formatting

    How do you copy cells that have Conditional Formatting and keep the Conditional Formatting?

    I'm using this code, I see the formatting (albeit briefly) and then it goes away.
    Please Login or Register  to view this content.
    Regards

    Rick
    Win10, Office 365

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Copy and paste cells with Conditional Formatting

    Hello there,

    When you use the below line in your code

    Please Login or Register  to view this content.
    By usinf the line xlPasteValuesAndNumberFormats you are telling the code to only paste values and number formats and to drop all other formatting from the cell, including conditional formatting. Try using the below line of code to replace the line above.

    Please Login or Register  to view this content.
    Let me know if this works!

    Thanks!

    RVASQUEZ

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Copy and paste cells with Conditional Formatting

    Not sure if this helps or not.

    One way is to transfer the formatting conditions step by step.

    Please Login or Register  to view this content.
    Martin

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: Copy and paste cells with Conditional Formatting

    Quote Originally Posted by rvasquez View Post
    Hello there,

    When you use the below line in your code

    Please Login or Register  to view this content.
    By usinf the line xlPasteValuesAndNumberFormats you are telling the code to only paste values and number formats and to drop all other formatting from the cell, including conditional formatting. Try using the below line of code to replace the line above.

    Please Login or Register  to view this content.
    Let me know if this works!

    Thanks!

    RVASQUEZ
    This copied text only without conditional formatting.

    I have found a workaround, since I am only copying data for a visual page with a chart the conditional formatting isnt really necessary.
    So I added a couple macros to color cells as needed.

    Please Login or Register  to view this content.
    thank you for your input!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1