View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] roniaelm@hotmail.com is offline
external usenet poster
 
Posts: 54
Default VBA change font color if existing cell value changes

On Jan 30, 6:47*pm, "Rick Rothstein"
wrote:
You didn't tells, so assuming the column you want to change is Column A....

Private Sub Worksheet_Change(ByVal Target As Range)
* * If Target.Address = "$A$2" Then
* * * * Range("A2").EntireColumn.Font.Color = RGB(255, 0, 0)
* * End If
End Sub

--
Rick (MVP - Excel)

wrote in message

...

Hi,


I have found a macro on the net and edited so that if an exisiting
cell value is changed the font will change to red.
However, I am trying to amend this code so that it refers to an entire
column and not just a cell. I am very new to VB and have not found a
way. Can someone help me amend this code or know a better way of doing
this.


Private Sub Worksheet_Change(ByVal Target As Range)
* *If Target.Address = ("$A$2") Then
* * * *Range("A2").Font.Color = RGB(255, 0, 0)
* *End If
End Sub


Hi Rick,

My column is A.
However, I am not sure if this adjustment is doing what it needs to.
My range is in column A (not just A2) and if any cell is changed in A
then I need the cell to change the font colour.
Is there a way to do this?

Thanks!