View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Comditional Formatting Problem

[Green] [<=1] 0.0%; [Red] [1] ##0.0%;

worked fine for me as well. (formated the merged cells).

Ben probably wants you to try
Format=Conditional Formatting

Regards,
Tom Ogilvy


"Ed P" wrote in message
...
Ben, If you are meaning something like this:

[Green] [<=1] 0.0%; [Red] [1] ##0.0%; Percentage

Then yes I have tried that as well. I have not been able to get this to

work
using any method. If you have other suggestions I am all ears.
Thanks for your help
Ed

"ben" wrote:

do you absolutely need this to run in a macro. could you instead use the
conditional formatting function provided with Excel? Formatting

Conditional
Formating
?


"Ed P" wrote:

Tom,
I apprecaite your help.
I have entered the Code as you instructed, but it still is not working
correctly.
I had originally chose 2 cells because those cells are merged. I am

not sure
if this is the problem or not.
Do you have any other suggestions?
Thanks again for your help.
Ed

"Tom Ogilvy" wrote:

Sub Red()
Range("F9").Select
If ActiveCell.Value 1 Then
ActiveCell.Font.ColorIndex = 3
End If
End Sub

would be what i would try if your cells contains percentages.

Also, if you are only working with the activecell, why select more

than one
cell.

--
Regards,
Tom Ogilvy


"Ed P" wrote in message
...
Can someone help me determine what is wrong with the following

code.
I am needing to change the color of the text in a cell to red if

the cell
is
100%.
My code I have currently is follows.

Sub Red()
Range("F9:G9").Select
If ActiveCell.Value 100 Then
ActiveCell.Font.ColorIndex = 3
End If
End Sub

I appreciate any help you can give me.
If I am taking the wrong approach please advise.
Thank You
Ed