View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Excel Conditional Formating

Martin,

You can use select case. Right click your sheet tab, view code and paste
this in.

Private Sub Worksheet_Calculate()
Select Case Range("G133").Value
Case Is = 123
icolor = 3
Case Is = 234
icolor = 4
Case Is = 345
icolor = 7
Case Is = 456
icolor = 9
Case Else
icolor = xlNone
End Select
Range("G133").Interior.ColorIndex = icolor
End Sub

Mike

"Martin D" wrote:

I have created a spreedsheet with a formula in CELL G133, which enters a text
sring contained in another Cell(s) dependant on the condition (result) of a
number in Cell F133. This works fine using the IF command.
CELL G133 Formula is =IF(F133<=4,T133,T134)

I now wish to change the colour of CELL G133 dependant on the Result of the
number in CELL F133 using conditional format. I have read most of the Q&A and
tried a few of them out. such as using Formula IS =f133<=4 turn cell to Green
but this does not appear to work. WHAT I AM DOING WRONG?

As a sup question I wish to have 4 different conditions but Excell 2003 only
appears to offer 3 options for conditional formating.

HELP PLEASE
--
Regards
Martin D