View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Change font color when making changes

OK

Copy paste this event code to your worksheet. Edit for range and cell ref(s).

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
'For a range of cells change to Me.Range("A1:A10")
On Error GoTo CleanUp
Application.EnableEvents = False
If Target.Value < "" Then
With Target.Font
.ColorIndex = 5
.Bold = True
End With
End If
CleanUp:
Application.EnableEvents = True
End Sub

To install this, right-click on your sheet tab and "View Code"

Copy/paste into that module.

Gord

On Wed, 27 Jun 2007 14:16:04 -0700, Mona wrote:

that was a very general example. It would be any change at all in the cell I
would like to have the color blue/bold.

"Gord Dibben" wrote:

Mona

Just the change from "cat" to "dog"could be done through CF.

But if that is just an example and if you mean any change at all in the cell
content the answer may be something else.


Gord Dibben MS Excel MVP


On Tue, 26 Jun 2007 11:43:00 -0700, Mona wrote:

Is there a way to autmatically change the font color to say "blue" if I make
a change to a cell?

If I have "cat" in A1 and change it to "dog" I would like dog to be blue and
bold.

Is this possible with conditional formatting or ?

thanks!