Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Color

If those two colors are your only choices, color B1 blue then select it and
FormatConditional FormattingCondition1Formula is:

=IF(A1100,A1<200)

Format to red and OK.


Gord Dibben MS Excel MVP

On Sun, 15 Jul 2007 08:26:01 -0700, AlanW
wrote:

Mike,
Other than the programming you mentioned, can I just simply use IF THEN ELSE
function in the worksheet to do it.

Thank you

"Mike" ???

Sub colorChange()
If Range("A1").Value 100 Then
If Range("A1").Value < 200 Then
Range("B1").Interior.ColorIndex = 3
Else
Range("B1").Interior.ColorIndex = 11
End If
End If
End Sub

"AlanW" wrote:

Could someone please show me the way to have a cell color changed based on
the condition of another cell. For example, if A1 100 and < 200 then B1's
color is red else blue. Thank you.


 
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
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color mikewillnot Charts and Charting in Excel 1 February 26th 08 05:22 PM
change fill color of a range of cells based on color of a cell? DarMelNel Excel Programming 0 March 2nd 06 06:35 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
My excel 2003 wont let me fill cells with color or color the tabs. trizog New Users to Excel 2 February 22nd 05 06:43 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 06:41 PM.

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

About Us

"It's about Microsoft Excel"