ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional formatting (https://www.excelbanter.com/excel-discussion-misc-queries/57566-conditional-formatting.html)

felipe

Conditional formatting
 
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.

Gary''s Student

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.


felipe

Conditional formatting
 
Well I cant do that because there is no conditional formatting no a
spreadsheet control. Im programming a outlook form that have a spreadsheet
control. I also tried using the if declaration, but I had no results

"Gary''s Student" escreveu:

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.


felipe

Conditional formatting
 
Well I cant do that because there is no conditional formatting no a
spreadsheet control. Im programming a outlook form that have a spreadsheet
control. I also tried using the if declaration, but I had no results

"Gary''s Student" escreveu:

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.



All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com