PC Review


Reply
Thread Tools Rate Thread

conditional for fill color?

 
 
jdifrancesco1@gmail.com
Guest
Posts: n/a
 
      19th Mar 2007
Is there a formula I can use to change the fill color of a cell?
like: IF A5>3 , color = 5

 
Reply With Quote
 
 
 
 
Ed
Guest
Posts: n/a
 
      19th Mar 2007
On Mar 19, 9:29 am, jdifrances...@gmail.com wrote:
> Is there a formula I can use to change the fill color of a cell?
> like: IF A5>3 , color = 5


Check out Conditional Formatting under the Format menu.
Ed

 
Reply With Quote
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      19th Mar 2007
Hi jdifrancesco1 -

Here are two methods:

Method 1 (The User Interface)
a. Select Cell A5 and choose |Format|Conditional Formatting...
b. Change Condition1 from "Cell Value Is" to "Formula Is"
c. In the reference box to the right of Condition1, enter the formula
"=A5>3" (without quotes).
d. Finally, press the [Format...] button and choose your fill color from the
pallete on the 'Patterns' tab.

Method 2 (VBA)
Place the following code in the module of the worksheet of interest:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A8") > 3 Then Range("A8").Interior.ColorIndex = 5
End Sub

To find out which colors are available in the pallette, copy the following
utililty to a standard VB module and run it from a blank worksheet. The row
number of each color is its colorindex (to use in the procedure above):

Sub jdi_Pallette()
For i = 1 To 56
Cells(i, 1).Interior.ColorIndex = i
Next i
End Sub
--
Jay


"(E-Mail Removed)" wrote:

> Is there a formula I can use to change the fill color of a cell?
> like: IF A5>3 , color = 5
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional color fill of bar graphs jwats Microsoft Excel Charting 2 7th Jan 2012 11:57 PM
Conditional color fill Monte Microsoft Excel Misc 3 26th Jul 2007 04:58 PM
Conditional color fill =?Utf-8?B?RXJpYw==?= Microsoft Excel Misc 4 11th Jul 2007 11:46 AM
Conditional color fill whole line... miwarren Microsoft Excel Worksheet Functions 3 27th Jul 2005 08:16 PM
Conditional color fill Prof Szembor Microsoft Excel Worksheet Functions 4 28th Sep 2003 02:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.