Set Color of Cell Background Based on value in another cell

S

ski2004_2005

Set Color of Cell Background Based on value in another cell::

Hi,
Here is my example. I need to set the fill background of cell b4 based
on the value that it is c4. Obviously you can't do this using
conditional formatting because it would only work for c4. It looks
like this:

b4 - blank cell
c4 - "complete"

I need b4 to be green if c4 = complete and i need it to be red if the
cell is equal to something else.

Thanks
 
J

JE McGimpsey

Sometimes what is obvious is wrong.

With B4 selected, format the background color as red and choose
Format/Conditional Formatting...

CF1: Formula is =C4="complete"
Format1: Patterns/<green>

ski2004_2005
 
G

Gary Keramidas

if b4 = complete, c4's background will be green

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B4")
If UCase(Range("C4").Value) = "COMPLETE" Then

.Interior.ColorIndex = 35
Else
.Interior.ColorIndex = 0

End If
End With
End Sub

--


Gary


"ski2004_2005" <[email protected]>
wrote in message
news:[email protected]...
 

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