Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume your goal is 80 and the cell is A1.
Private Sub Worksheet_Change(By Val Target As Range) If Cells(1, 1) <= 79 And Cells(1, 1) < "" Then Cells(1, 1).Interior.ColorIndex = 3 Cells(1, 1).Font.ColorIndex = 2 ElseIf Cells(1, 1) = 80 And Cells(1, 1) < "" Then Cells(1, 1).Interior.ColorIndex = 10 Cells(1, 1).Font.ColorIndex = 1 End If End Sub This would go in your Worksheet code module. Right click the sheet tab, click view code, copy above code and paste into module. "kAustin79" wrote: I have Excel 2003. I want to change the fill color of a cell in relation to it's own contents (ex. I will set a number as a goal for myself. There will be a cell that will calculate my progress. While I am still under my goal number, the fill color of the cell will be red and the text white - Once I exceed my goal, the fill color will turn green and the text will be black). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I fill one cell color with text html/rgb color from another | Excel Discussion (Misc queries) | |||
Match TextBox Back Color to Cell Fill Color | Excel Programming | |||
Fill in Color within formulas | Excel Worksheet Functions | |||
manipulate color with code | Excel Programming | |||
change fill color of a range of cells based on color of a cell? | Excel Programming |