Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Set Color of Cell Background Based on value in another cell


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Set Color of Cell Background Based on value in another cell

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

In article ,
ski2004_2005
wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Sum Based on Cell Background Color Thomas M. Excel Worksheet Functions 7 January 21st 13 11:14 PM
Change background color of cell based on vlookup in cell Antney Excel Discussion (Misc queries) 1 October 19th 09 10:55 PM
Changing Cell Background Color based on data from another cell Speedy Excel Discussion (Misc queries) 2 March 16th 09 04:10 PM
Changing background color based on different cell djarcadian Excel Discussion (Misc queries) 3 August 10th 06 10:44 PM
Setting cell background color based on value Erik[_5_] Excel Programming 3 February 25th 04 10:56 PM


All times are GMT +1. The time now is 11:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"