Removing conditional formatting if it exists

  • Thread starter Thread starter Shaun Allan
  • Start date Start date
S

Shaun Allan

On a group of spreadsheets, on the sheet names "Single",
column N sometimes has conditional formatting (2
conditions) that shouldn't be there. How can I get rid of
this in code please?
 
One way:

Public Sub RemoveCFinColumnN()
Dim wsSheet As Worksheet
On Error Resume Next
Set wsSheet = Sheets("Single")
On Error GoTo 0
If Not wsSheet Is Nothing Then _
wsSheet.Columns(14).FormatConditions.Delete
End Sub
 
Shaun,

Sub TEST()

On Error Resume Next
Worksheets("Single").Columns(5).FormatConditions.Delete

End Sub


--
Regards,
Soo Cheon Jheong
_ _
^¢¯^
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top