Could you help me to modify the next under defined macro? My request is that depending of the value of the column N I need a background change in the same row but just column A.
Example: if cell N9 value is 1 then change the background colour of cell A9 (same row) and so on. Other columns contains more data where i don't need conditional formatting.
Private Sub Worksheet_Change(ByVal Target As Range)
Set Sheet = Range("N9:N200")
For Each Cell In Sheet
If Cell.Value = 1 Then
Cell.Interior.ColorIndex = 3
End If
If Cell.Value = 2 Then
Cell.Interior.ColorIndex = 4
End If
If Cell.Value = 3 Then
Cell.Interior.ColorIndex = 18
End If
If Cell.Value = 4 Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = 5 Then
Cell.Interior.ColorIndex = 7
End If
If Cell.Value = 6 Then
Cell.Interior.ColorIndex = 7
End If
Next
End Sub
Bookmarks