The snippet of code below converts the applied Condition Formatting formatting rule to a FIXED format so that when
the Sub continues and the cell is subsequently copied it ONLY copies the format not the CF rule.
Slight issue with it is that it’s filling cells that have NO formatting what so ever to “White” Interior.Color which of course gets copied.
I have tried to handle it by adding an "IF" to the snippet to test for formatting; if it has its Fixed , if it doesn’t it skips it.
But I just couldn’t get the syntax right, can anyone help me out?
the Sub continues and the cell is subsequently copied it ONLY copies the format not the CF rule.
Slight issue with it is that it’s filling cells that have NO formatting what so ever to “White” Interior.Color which of course gets copied.
I have tried to handle it by adding an "IF" to the snippet to test for formatting; if it has its Fixed , if it doesn’t it skips it.
But I just couldn’t get the syntax right, can anyone help me out?
VBA Code:
For Each r In UsedRng
r.Interior.Color = r.DisplayFormat.Interior.Color ' This converts the Conditional Formatting effect to a "Fixed" static color format
r.Font.Color = r.DisplayFormat.Font.Color ' This keeps any Font color as it was, without it the font will be black
Next r
UsedRng.FormatConditions.Delete ' This deletes the CF rule from the range just converted to "Fixed" colors BEFORE range is copied