View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Set Color of Cell Background Based on value in another cell

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"
wrote in message
news:ski2004_2005.1xkwyc_1130447121.5288@excelforu m-nospam.com...

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


--
ski2004_2005
------------------------------------------------------------------------
ski2004_2005's Profile:
http://www.excelforum.com/member.php...o&userid=16418
View this thread: http://www.excelforum.com/showthread...hreadid=479942