ebea
Active Member
- Joined
- Jul 12, 2008
- Messages
- 296
- Office Version
- 2021
- Platform
- Windows
Hi! I have the following code, which works well, if I manually change the RGB vaues in the respective RGB cells. But as the RGB values are updated by a formula, the color cells linked, are not updated when RGB values change.
How can I get it to update colors, when formulas change the RGB values?
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Intersect(Target, Range("E16:F46")) Is Nothing Then Exit Sub
With Range("B" & Target.Row)
.Interior.Color = RGB(.Offset(, -3).Value, .Offset(, -2).Value, .Offset(, -1).Value)
End With
End Sub
How can I get it to update colors, when formulas change the RGB values?
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Intersect(Target, Range("E16:F46")) Is Nothing Then Exit Sub
With Range("B" & Target.Row)
.Interior.Color = RGB(.Offset(, -3).Value, .Offset(, -2).Value, .Offset(, -1).Value)
End With
End Sub