Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default conditional for fill color?

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 65
Default conditional for fill color?

On Mar 19, 9:29 am, wrote:
Is there a formula I can use to change the fill color of a cell?
like: IF A53 , color = 5


Check out Conditional Formatting under the Format menu.
Ed

  #3   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default conditional for fill color?

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
"=A53" (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


" wrote:

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


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 color fill of bar graphs jwats Charts and Charting in Excel 1 April 2nd 09 05:15 PM
Conditional color fill Monte Excel Discussion (Misc queries) 3 July 26th 07 04:58 PM
Conditional color fill Eric Excel Discussion (Misc queries) 4 July 11th 07 11:46 AM
Cell Formatting Conditional On Other Cells Fill Color? [email protected] Excel Programming 2 April 6th 06 05:22 PM
Conditional color fill whole line... miwarren Excel Worksheet Functions 3 July 27th 05 08:16 PM


All times are GMT +1. The time now is 11:08 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"