I have using the following code for conditional formatting
Sub Worksheet_Change(ByVal Target As Range)
Dim Colour As Integer
If Not Intersect(Target, Range("G3:M93")) Is Nothing Then
Select Case Target
Case "Sick"
Colour = 6
Case "Hol"
Colour = 12
Case "SUS"
Colour = 7
Case "N/A"
Colour = 53
Case "CPC"
Colour = 15
Case "ff"
Colour = 42
Case Else
End Select
Target.Interior.ColorIndex = Colour
End If
End Sub
This works fine in itself however it only works if I put the code in a worksheet but I need it to apply to multiple worksheets (some are yet to be created). So when I put the code into "ThisWorkbook" the conditional formatting does not work.
Thank you
Bookmarks