![]() |
Removing conditional formatting if it exists
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? |
Removing conditional formatting if it exists
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 In article , "Shaun Allan" wrote: 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? |
Removing conditional formatting if it exists
Shaun,
Sub TEST() On Error Resume Next Worksheets("Single").Columns(5).FormatConditions.D elete End Sub -- Regards, Soo Cheon Jheong _ _ ^вп^ -- |
Removing conditional formatting if it exists
Excellent! Thanks!
|
All times are GMT +1. The time now is 12:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com