Excel - Copy Conditional Formatting, Remove Rules, Keep Format

后端 未结 5 2078
無奈伤痛
無奈伤痛 2020-12-06 06:28

I know you usually show what you\'ve tried in a question, but this is more of a \"Do you have a good routine that does this?\" question and I\'m hoping you\'ll be willing to

相关标签:
5条回答
  • 2020-12-06 06:58

    A very simple method is to filter the list by color. Then FILL with the appropriate cell color you need. then unfilter and remove conditional formatting. The fill will remain.

    0 讨论(0)
  • 2020-12-06 07:00

    Yes it is possible :) What you need to do is change the formatting of the cells that you plan to copy by mimicking the DisplayFormat and then deleting the conditional formatting

    Sub Keep_Format()
        Dim ws As Worksheet
        Dim mySel As Range, aCell As Range
    
        '~~> Change this to the relevant sheet
        Set ws = ThisWorkbook.Sheets("Sheet1")
        '~~> Change this to the relevant range
        Set mySel = ws.Range("A1:A10")
    
        For Each aCell In mySel
            With aCell
              .Font.FontStyle = .DisplayFormat.Font.FontStyle
              .Interior.Color = .DisplayFormat.Interior.Color
              .Font.Strikethrough = .DisplayFormat.Font.Strikethrough
            End With
        Next aCell
    
        mySel.FormatConditions.Delete
    
        '
        '~~> Now Do the copying
        '
    
        '~~> Once you are done, close the sorce worksheet without saving
    End Sub
    
    0 讨论(0)
  • 2020-12-06 07:00

    I think I've got it with the Office Clipboard: Copy range, open the Office Clipboard pane (the tiny button in the bottom right corner of the Clipboard section under the Home tab) and paste from there.

    Here's a demo: http://www.bookkempt.com/2017/08/remove-conditional-formatting-but-keep.html

    0 讨论(0)
  • 2020-12-06 07:16

    I was trying to do the same, all answers seemed too much of work for me or based on some bug / glitch.

    What worked for me is opening ms word copying the whole table from ms excel into ms word then pasting it back to ms excel. The style is there but the conditional formatting doesn't apply anymore.

    0 讨论(0)
  • 2020-12-06 07:20

    I copied my range of cells. Pasted them into Word. Recopied the range in Word and pasted back into excel.

    0 讨论(0)
提交回复
热议问题