Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: India
Posts: 24
Send a message via Skype™ to Gaura215
Default Macro to Update Conditional Formatting Formulae

Hello

Excel gurus.

I am an amaeture to excel VBA, but I am sure its usage will make my life easier. Actually, there are few spreadsheet in which I applied conditional fomatting. The conditional formatting is based on a formula. However now i realised that I want to change that conditional formatting formula. Is there a way to update it on active spreadsheet using a macro.

Conditional formatting that I want is following:

Applies to $G$6:$M$16
Formula = =IF($L$16<-0.001,IF($L$160.001,0))
I want to change the colour of the applicable range to RED.

Please help.

Thanks to all excel gurus in anticipation.

Regards
Gaurav
__________________
Regards
Gaurav
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Macro to Update Conditional Formatting Formulae

Hi,

Am Wed, 3 Dec 2014 12:31:39 +0000 schrieb Gaura215:

Applies to $G$6:$M$16
Formula = =IF($L$16<-0.001,IF($L$160.001,0))
I want to change the colour of the applicable range to RED.


try:

Range("G6:M16").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=OR($L$16<-0.001,$L$160.001)"

Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.Color = 255
End With

Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
conditional formatting update issue Colin Hayes Excel Worksheet Functions 5 September 17th 12 08:37 AM
conditional formatting or formulae to show elapsed dates Jo Excel Worksheet Functions 3 May 26th 07 11:14 PM
Combine Conditional Formatting Rules formulae Fred Excel Discussion (Misc queries) 3 March 16th 07 02:27 AM
Nested functions in conditional formatting formulae Joseph Excel Discussion (Misc queries) 3 October 20th 05 11:52 PM
Formulae, conditional formatting & macro security Kevin Lucas Excel Discussion (Misc queries) 7 March 15th 05 01:10 PM


All times are GMT +1. The time now is 08:05 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"