I am using this code to update the cell color in F4:F3000 base on the corresponding value in each case, however because I am using a formula to update the cells containing each case this operation is not functioning only the formula is updating, not the actual value in E4:E3000. Is it possible to write code in VBA to run when the formula updates? Here is the code I am currently using to perform this action manually.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("E4:E3000")) Is Nothing Then
Select Case Target
Case "1, 1, 1"
icolor = 9
Case "2, 1, 1"
icolor = 11
Case "2, 2, 2"
icolor = 12
Case "3, 2, 1"
icolor = 13
Case "3, 2, 2"
icolor = 14
Case "3, 3, 2"
icolor = 15
Case "4, 3, 2"
icolor = 16
Case "4, 4, 3"
icolor = 17
Case Else
icolor = 18
End Select
Target.Offset(ColumnOffset:=1).Interior.ColorIndex = icolor
End If
End Sub