Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Removing conditional formatting if it exists

Excellent! Thanks!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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
_ _
^ąŻ^
--




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing formatting kippers Excel Discussion (Misc queries) 1 October 16th 07 03:07 PM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM
Formula if a conditional format exists Shu of AZ Excel Discussion (Misc queries) 1 December 18th 06 02:56 PM
Return adjacent cell if conditional formatting exists. Donna Excel Worksheet Functions 12 November 10th 06 04:34 AM
Removing formatting Carla Excel Discussion (Misc queries) 1 August 22nd 05 06:41 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"