Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Conditional Formatting Help

I am trying to do a conditional format on the rngInsitedata range. If the
cell value is past due I want the cell to be Red Fill and font color white.
Please help.

With rngInsitedata
.FormatConditions.Add(xlCellValue, xlEqual,"=Past Due")
With .Borders
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 6
End With
With .Font
.Bold = True
.ColorIndex = 3
End With
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Conditional Formatting Help

Try the below

Sub Macro()
Dim rngInsiteData As Range
Set rngInsiteData = Range("C1:C10")

With rngInsiteData
..FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Past Due"""
..FormatConditions(1).Font.ColorIndex = 2
..FormatConditions(1).Interior.ColorIndex = 3
..FormatConditions(1).Interior.Pattern = xlSolid
End With
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am trying to do a conditional format on the rngInsitedata range. If the
cell value is past due I want the cell to be Red Fill and font color white.
Please help.

With rngInsitedata
.FormatConditions.Add(xlCellValue, xlEqual,"=Past Due")
With .Borders
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 6
End With
With .Font
.Bold = True
.ColorIndex = 3
End With
End With

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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


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