View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default formatting the target cell

I'm trying to set in red the cell in the Colamn 9 if the value is 'No'.
There is some conditional formatting as well - if there is some value it's
green, if it's empty it's without any collar.
I'm using the following code to make it red if it's "No":
If Target.Column = 9 Then
With Target(1, 1)
If Target.Value < "" Then
If Target.Value = "No" Then
.Interior.ColorIndex = 3
.Interior.Pattern = xlSolid
End If
Else
.ClearContents
End If
End With
End If
But, it's getting red when I enter 'No' and after that clean the cell. But,
I need it red when the cell value is "No".

Could anybody advise anything.

Thanks