hartless43
New Member
- Joined
- Dec 28, 2022
- Messages
- 35
- Office Version
- 365
- Platform
- Windows
Below is a code that a user place here about 5 years ago and it still works.
This will delete any cell with a red font. However, if it was created from Conditional Formatting it won't delete it. So, is there a work around this?
Excel Formula:
Sub DeleteRedFont()
Dim rng As Range
Set rng = [B2:J2]
For Each cell In rng
If cell.Font.ColorIndex = 3 Then
cell.ClearContents
End If
Next cell
End Sub
This will delete any cell with a red font. However, if it was created from Conditional Formatting it won't delete it. So, is there a work around this?