Hello,
I have a question related to previous posting if you please.
I am looking for way to change the color of the text in a cell in column C based on the cell that is active in column I for the corresponding row. That is, if cell I44 is the active cell, then the text in cell C44 changes to red.
I have coding I received elsewhere that does this for a different column relationship (I apologize to the author as I don’t exactly remember who gave this to me). As example, in my current code, if the active cell is M55 then the text in C55 changes to red. I’d like a similar thing to happen if the active cell is in column I.
Here is my existing code. Please note, the proposed code does not have to be the same as the current. I simply posted it as an example. If you have a different idea that’s fine –
Thanks for viewing,
Steve K.
I have a question related to previous posting if you please.
I am looking for way to change the color of the text in a cell in column C based on the cell that is active in column I for the corresponding row. That is, if cell I44 is the active cell, then the text in cell C44 changes to red.
I have coding I received elsewhere that does this for a different column relationship (I apologize to the author as I don’t exactly remember who gave this to me). As example, in my current code, if the active cell is M55 then the text in C55 changes to red. I’d like a similar thing to happen if the active cell is in column I.
Here is my existing code. Please note, the proposed code does not have to be the same as the current. I simply posted it as an example. If you have a different idea that’s fine –
VBA Code:
Option Explicit
Public Old As Integer
Public Now As Integer
‘- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If Not Intersect(target, Range("M32:M2032")) Is Nothing Then
Now = (Split(ActiveCell(1).Address(1, 0), "$")(1))
If (Old <> Now) Then
UnProtect_It
Range(Cells(Now, 3), Cells(Now, 3)).Font.Color = vbRed
If Old Then Range(Cells(Old, 3), Cells(Old, 3)).Font.Color = False
Range(Cells(Now, 3), Cells(Now, 3)).Font.Bold = True
If Old Then Range(Cells(Old, 3), Cells(Old, 3)).Font.Bold = False
Protect_It
End If
Old = Now
End If
Thanks for viewing,
Steve K.