I’m looking for VBA coding that changes the text color of a cell in column C if the active cell is in column I. That is if the active cell is I44 then the text in C44 turns Red. If I cursor down to I45 then C44 text returns to Black and now C45 text turns Red.
I have this working for a different part of my worksheet. It operates very similarly (i.e., if active cell is in column M then cell in column C turns Red). Following is the code that triggers that. Please note I did not write this code – don’t remember where it came from. It's placed in "Private Sub Worksheet_SelectionChange(ByVal Target As Range)"
Thanks for viewing,
Steve K.
I have this working for a different part of my worksheet. It operates very similarly (i.e., if active cell is in column M then cell in column C turns Red). Following is the code that triggers that. Please note I did not write this code – don’t remember where it came from. It's placed in "Private Sub Worksheet_SelectionChange(ByVal Target As Range)"
VBA Code:
If Not Intersect(Target, Range("M32:M1300,I32:I1300")) Is Nothing Then
Now = (Split(ActiveCell(1).Address(1, 0), "$")(1))
If (Old <> Now) Then
UnProtect_It '<--- This sub Unprotects the worksheet ----
Range(Cells(Now, 3), Cells(Now, 3)).Font.Bold = True
If Old Then Range(Cells(Old, 3), Cells(Old, 3)).Font.Bold = False
Range(Cells(Now, 3), Cells(Now, 3)).Font.Color = vbRed
If Old Then Range(Cells(Old, 3), Cells(Old, 3)).Font.Color = False
Protect_It '<--- This sub Protects the worksheet ----
End If
Old = Now
End If
Thanks for viewing,
Steve K.