Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("P3:P20")) Is Nothing Then
Select Case Target
Case "Apples"
With Target
.Interior.Color = RGB(153, 204, 0)
.Font.Color = RGB(0, 0, 0)
End With
Case "Apples / Rasberry"
With Target
.Interior.Color = RGB(153, 153, 255)
.Font.Color = RGB(0, 0, 0)
End With
Case "Jam"
With Target
.Interior.Color = RGB(128, 0, 128)
.Font.Color = RGB(255, 255, 255)
End With
Case "Nectarine"
With Target
.Interior.Color = RGB(0, 0, 128)
.Font.Color = RGB(255, 255, 255)
End With
Case "Nectarine / Apples"
With Target
.Interior.Color = RGB(255, 255, 153)
.Font.Color = RGB(0, 0, 0)
End With
Case "Nectarine / Rasberry"
With Target
.Interior.Color = RGB(255, 204, 153)
.Font.Color = RGB(0, 0, 0)
End With
Case "Orange"
With Target
.Interior.Color = RGB(255, 153, 204)
.Font.Color = RGB(0, 0, 0)
End With
Case "Rasberry"
With Target
.Interior.Color = RGB(153, 204, 255)
.Font.Color = RGB(0, 0, 0)
End With
Case "Sausage"
With Target
.Interior.Color = RGB(0, 0, 0)
.Font.Color = RGB(255, 255, 255)
End With
Case Else
With Target
.Interior.Color = RGB(255, 204, 0)
.Font.Color = RGB(0, 0, 0)
End With
End Select
End If
End Sub
2. Right click the relevant tab you want the code to run on and from the shortcut menu select
Bookmarks