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: 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
 
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 % and KPI target in excel 2003 pompeyblue Excel Discussion (Misc queries) 0 December 17th 09 03:26 PM
Target cell reference moves when target is cut and pasted Illya Teideman Excel Discussion (Misc queries) 5 May 31st 07 11:34 AM
Maintain cell formatting in target cell when using Paste bbotzler Excel Discussion (Misc queries) 1 February 27th 07 12:26 AM
Ranges:Target in Worksheet_SelectionChange(ByVal Target As Range) Kevin McCartney Excel Programming 3 April 15th 05 01:51 PM
How find if target is object in Worksheet_Change (ByVal Target As.. ?) Gunnar Johansson Excel Programming 3 July 1st 04 09:25 PM


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