View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default conditional formatting of cells based on result in hidden cell

Depends on how the code is written:

If Target.Column = "A" Then
If Target.Value = 1 Then
Range("B1").Interior.ColorIndex = 2
ElseIf Target.Value = 2 Then
Range("C2").Interior.ColorIndex = 3
Else
Range("D3").Interior.ColorIndex = 4
End If
End If

With the above code placed in a procedure in a code module, the target cell
can be in column A, but the results of the criteria evaluation will be shown
in cells in different columns. However, if you are using the built in
conditional formatting facility, then the results will only apply to the
cell where the format is extablished.



"Papa Jonah" wrote in message
...
I have a column (Z) that reflects status for each record (rows). I want to
have conditional formatting based on the content in column AA (which is
hidden - but has the calculations).
I have four options that I need to be able to develop a corresponding
color
for for the cells in Z.

My understanding of other code examples that have been posted using Target
is that they don't apply to looking at one cell and formatting a different
cell.

TIA,
Papa J