Hello,
I'm trying to use this VBA code that claims to be able to clear a cells contents if conditional formatting has been applied to a cell.
Code from that thread:
When I try to use the code as is, it throws a compiling error:
This code was written in 2004 so I can only assume that the Syntax has changed since then.
I'm basically trying to clear the contents from the active cell if conditional formatting has been applied to it.
I often build a list of Quiz numbers into a column. If it's a duplicate within the column, the cell will highlight Red. If it's a duplicate in the Master List located on another Sheet, it will highlight Orange.
I often just delete the cell contents once I see it's a duplicate, but I'd like to automate the process so that once I paste the value, it will automatically be cleared once the CF has been applied.
I'll know it's a duplicate when I see that the cell remains clear after pasting my value and hitting Enter.
I'm trying to use this VBA code that claims to be able to clear a cells contents if conditional formatting has been applied to a cell.
FormatCondition = True?
Hi, I'm trying to use a macro to delete a cell if it IS conditional formatted. It seems right now that the colorvalue of the font is NOT stored in Font.ColorIndex, and so my IF statement based on that is not working either. Here's the statement I am trying to use: Public Sub...
www.mrexcel.com
VBA Code:
Public Sub DeleteHighlighted()
Set rng = Selection
For Each c In rng
If c.FomratCondition = True Then
c.Clear
Else
End If
Next c
End Sub
This code was written in 2004 so I can only assume that the Syntax has changed since then.
I'm basically trying to clear the contents from the active cell if conditional formatting has been applied to it.
I often build a list of Quiz numbers into a column. If it's a duplicate within the column, the cell will highlight Red. If it's a duplicate in the Master List located on another Sheet, it will highlight Orange.
I often just delete the cell contents once I see it's a duplicate, but I'd like to automate the process so that once I paste the value, it will automatically be cleared once the CF has been applied.
I'll know it's a duplicate when I see that the cell remains clear after pasting my value and hitting Enter.