LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Conditional Formatting Code

I recorded this code but I need it to do more and work a little differently.
I need it to first remove any existing "Conditional" formatting. Not all
formatting, just remove the existing conditional formatting. I then need to
add the conditional formatting as detailed below.

Also, my intent was to copy the formatting from the first cell into others.
I need it to do all this with out selecting (.Select). Please help.

Sheets("Travel").Range("R7:R8").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(IF(R90,0,IF(SUM(T9)0,1,0)))0"

Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Selection.Copy
Range("R9:R10,R12:R13,R15:R16").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False



--
Thanks
Shawn
 
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 Code JoAnn Excel Programming 4 June 25th 08 05:56 PM
Conditional Formatting vb code beverlydawn Excel Programming 1 March 5th 08 07:41 PM
Conditional Formatting using code Ayo Excel Discussion (Misc queries) 5 February 29th 08 01:09 PM
Conditional Formatting to VBA code Dean P. Excel Programming 1 December 18th 07 05:03 PM
Need help to changes a conditional formatting code.... BeSmart Excel Programming 7 September 14th 04 01:27 AM


All times are GMT +1. The time now is 09:46 PM.

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"