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: 5
Default VBA adding Conditional Format to Range referencing another column value

I have the following ranges setup to give a number of rows in a column. The
first Cond. Format sets the Font colour to white if the cell value is zero,
this is successful. What I require to do is set a second Cond. Format in the
same range but referencing a value in the same row but in another column.
What do I need to use as the Formula1 for the 2nd Format.
Regards

Set rng = appExcel.ActiveCell.Offset(rowOffset:=0, columnOffset:=2)
Set rngStart22 = Range(rng, rng.Offset(intSummaryLineCount - 1, 0))

With rngStart22
.FormatConditions.Delete
.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual,
Formula1:="0"
With .FormatConditions(1).Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
.FormatConditions(1).StopIfTrue = True

.FormatConditions.Add Type:=xlExpression, Formula1:= ?????????? =
"1"
With Selection.FormatConditions(2).Font
.Color = -16727809
.TintAndShade = 0
End With
Selection.FormatConditions(2).StopIfTrue = True
End With


 
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 referencing 3 cells by row in a range TheMTCGal Excel Discussion (Misc queries) 3 December 8th 09 08:12 AM
In Excel, conditional format (font red) referencing another cell? Christine Hemphill Excel Worksheet Functions 39 November 12th 09 03:40 PM
display a conditional format in a range from another column DAN Excel Discussion (Misc queries) 10 March 9th 08 10:34 PM
How do I conditional format by referencing failure/success? Thomas from Ezipin Canada Excel Worksheet Functions 2 September 19th 06 11:41 PM
Referencing a Column in a Selected Range of Columns Rob G Excel Programming 3 October 21st 04 05:21 PM


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