View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Conditional formatting

Manually select cell A1 and pull-down
Format Conditional Formatting and select:
Cell is less than 0
and apply your format.


The Macro Recodred can capture this:

Sub Macro1()
Range("A1").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="0"
Selection.FormatConditions(1).Interior.ColorIndex = 4
End Sub

--
Gary''s Student


"felipe" wrote:

Hi Im working with a spreadsheet control, and I realize that lots of the
vbscript programming is like excel programming. Well spreadsheet control does
not support conditional formatting, so to go around this problem I tried a
couple of codes but I had no look. What Im trying to do is change the font
color of a cell if the result of a formula is less then 0. thanks.