sparky2205
Well-known Member
- Joined
- Feb 6, 2013
- Messages
- 507
- Office Version
- 365
- 2016
- Platform
- Windows
Folks,
I have the following code:
Snapshot:
I am updating the format of a number in column 16 based on the colour of the font in column 1. This works fine if I change the value in column 1.
What I'm looking for:
The same thing, but the macro must run when the font in column 1 is changed, not the value.
Is this possible?
I have the following code:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
If Not Intersect(Target, Range("$A$8:" & "A" & lr)) Is Nothing Then
If Target(1).Font.Color = 0 Then
With Target(1).Offset(0, 16).Font
.Color = 0
.Italic = False
End With
Else:
With Target(1).Offset(0, 16).Font
.Color = 255
.Italic = True
End With
End If
End If
End Sub
Snapshot:
I am updating the format of a number in column 16 based on the colour of the font in column 1. This works fine if I change the value in column 1.
What I'm looking for:
The same thing, but the macro must run when the font in column 1 is changed, not the value.
Is this possible?