conditional formatting of cells based on result in hidden cell

P

Papa Jonah

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
 
J

JLGWhiz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top